idmission-web-sdk 1.0.392 → 1.0.394

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.
@@ -49,7 +49,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
49
49
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
50
50
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
51
51
 
52
- var webSdkVersion = '1.0.392';
52
+ var webSdkVersion = '1.0.394';
53
53
 
54
54
  function getPlatform() {
55
55
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2358,7 +2358,7 @@ var defaultFocusThresholds = {
2358
2358
  var models = {};
2359
2359
  function loadFocusModel(modelAssetPath) {
2360
2360
  return tslib.__awaiter(this, void 0, void 0, function () {
2361
- var id, _a, _b, _c, _d;
2361
+ var id, _a, _b, _c, _d, emptyFrame;
2362
2362
  return tslib.__generator(this, function (_e) {
2363
2363
  switch (_e.label) {
2364
2364
  case 0:
@@ -2384,6 +2384,9 @@ function loadFocusModel(modelAssetPath) {
2384
2384
  }])];
2385
2385
  case 3:
2386
2386
  _a[_b] = _e.sent();
2387
+ emptyFrame = document.createElement('canvas');
2388
+ models[id].classifyForVideo(emptyFrame, performance.now());
2389
+ emptyFrame.remove();
2387
2390
  return [2 /*return*/, models[id]];
2388
2391
  }
2389
2392
  });
@@ -2624,7 +2627,7 @@ var defaultSelfieCaptureModelLoadTimeoutMs = 45000;
2624
2627
  var detector;
2625
2628
  function loadFaceDetector() {
2626
2629
  return tslib.__awaiter(this, void 0, void 0, function () {
2627
- var _a, _b;
2630
+ var _a, _b, emptyFrame;
2628
2631
  return tslib.__generator(this, function (_c) {
2629
2632
  switch (_c.label) {
2630
2633
  case 0:
@@ -2647,6 +2650,9 @@ function loadFaceDetector() {
2647
2650
  }])];
2648
2651
  case 3:
2649
2652
  detector = _c.sent();
2653
+ emptyFrame = document.createElement('canvas');
2654
+ detector.detectForVideo(emptyFrame, performance.now());
2655
+ emptyFrame.remove();
2650
2656
  return [2 /*return*/, detector];
2651
2657
  }
2652
2658
  });
@@ -2956,7 +2962,7 @@ var defaultDocumentDetectionScoreThreshold = 0.1;
2956
2962
  var defaultDocumentDetectionModelLoadTimeoutMs = 45000;
2957
2963
  var defaultDocumentDetectionThresholds = {
2958
2964
  idCard: 0.8,
2959
- passport: 0.1,
2965
+ passport: 0.8,
2960
2966
  mrz: 0.5,
2961
2967
  pdf417: 0.15
2962
2968
  };
@@ -2969,7 +2975,7 @@ function loadDocumentDetector(modelAssetPath, scoreThreshold) {
2969
2975
  scoreThreshold = defaultDocumentDetectionScoreThreshold;
2970
2976
  }
2971
2977
  return tslib.__awaiter(this, void 0, void 0, function () {
2972
- var id, _a, _b, _c, _d;
2978
+ var id, _a, _b, _c, _d, emptyFrame;
2973
2979
  return tslib.__generator(this, function (_e) {
2974
2980
  switch (_e.label) {
2975
2981
  case 0:
@@ -2996,6 +3002,9 @@ function loadDocumentDetector(modelAssetPath, scoreThreshold) {
2996
3002
  }])];
2997
3003
  case 3:
2998
3004
  _a[_b] = _e.sent();
3005
+ emptyFrame = document.createElement('canvas');
3006
+ detectors[id].detectForVideo(emptyFrame, performance.now());
3007
+ emptyFrame.remove();
2999
3008
  return [2 /*return*/, detectors[id]];
3000
3009
  }
3001
3010
  });