idmission-web-sdk 2.2.62 → 2.2.63

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.2.62';
214
+ var webSdkVersion = '2.2.63';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -8651,7 +8651,7 @@
8651
8651
  _b = _a.requireVerticalFaceCentering,
8652
8652
  requireVerticalFaceCentering = _b === void 0 ? true : _b,
8653
8653
  _c = _a.stabilityThreshold,
8654
- stabilityThreshold = _c === void 0 ? 0.75 : _c;
8654
+ stabilityThreshold = _c === void 0 ? 0.7 : _c;
8655
8655
  var face = faces[0];
8656
8656
  var faceNotDetected = faces.length === 0;
8657
8657
  var faceNotCentered = requireVerticalFaceCentering,
@@ -21093,22 +21093,20 @@
21093
21093
  var animationFrame = React.useRef(0);
21094
21094
  React.useEffect(function () {
21095
21095
  if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
21096
- var _a = [camera.width, camera.height],
21097
- w = _a[0],
21098
- h = _a[1];
21099
- var isPortrait = w < h;
21100
- outputCanvas.current.width = w;
21101
- outputCanvas.current.height = h;
21102
21096
  var ctx = outputCanvas.current.getContext('2d');
21103
21097
  if (!ctx) return;
21104
21098
  animationFrame.current = requestAnimationFrame(function runFrame() {
21105
21099
  return __awaiter(this, void 0, void 0, function () {
21106
- var rect;
21107
- return __generator(this, function (_a) {
21100
+ var _a, w, h, isPortrait, rect;
21101
+ return __generator(this, function (_b) {
21108
21102
  if (!signaturePad.current || !videoRef.current || !outputCanvas.current) {
21109
21103
  cancelAnimationFrame(animationFrame.current);
21110
21104
  return [2 /*return*/];
21111
21105
  }
21106
+ _a = [videoRef.current.videoWidth, videoRef.current.videoHeight], w = _a[0], h = _a[1];
21107
+ isPortrait = w < h;
21108
+ outputCanvas.current.width = w;
21109
+ outputCanvas.current.height = h;
21112
21110
  rect = [w * (isPortrait ? 0.02 : 0.15), h * (isPortrait ? 0.15 : 0.25), w * (isPortrait ? 0.96 : 0.7), h * (isPortrait ? 0.7 : 0.5)];
21113
21111
  ctx.drawImage(videoRef.current, 0, 0, w, h);
21114
21112
  ctx.beginPath();