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.
package/dist/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.62';
206
+ var webSdkVersion = '2.2.63';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2578,7 +2578,7 @@ function processFaceDetectorPrediction(_a) {
2578
2578
  _b = _a.requireVerticalFaceCentering,
2579
2579
  requireVerticalFaceCentering = _b === void 0 ? true : _b,
2580
2580
  _c = _a.stabilityThreshold,
2581
- stabilityThreshold = _c === void 0 ? 0.75 : _c;
2581
+ stabilityThreshold = _c === void 0 ? 0.7 : _c;
2582
2582
  var face = faces[0];
2583
2583
  var faceNotDetected = faces.length === 0;
2584
2584
  var faceNotCentered = requireVerticalFaceCentering,
@@ -11251,22 +11251,20 @@ function VideoSignatureContextProvider(_a) {
11251
11251
  var animationFrame = useRef(0);
11252
11252
  useEffect(function () {
11253
11253
  if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
11254
- var _a = [camera.width, camera.height],
11255
- w = _a[0],
11256
- h = _a[1];
11257
- var isPortrait = w < h;
11258
- outputCanvas.current.width = w;
11259
- outputCanvas.current.height = h;
11260
11254
  var ctx = outputCanvas.current.getContext('2d');
11261
11255
  if (!ctx) return;
11262
11256
  animationFrame.current = requestAnimationFrame(function runFrame() {
11263
11257
  return __awaiter(this, void 0, void 0, function () {
11264
- var rect;
11265
- return __generator(this, function (_a) {
11258
+ var _a, w, h, isPortrait, rect;
11259
+ return __generator(this, function (_b) {
11266
11260
  if (!signaturePad.current || !videoRef.current || !outputCanvas.current) {
11267
11261
  cancelAnimationFrame(animationFrame.current);
11268
11262
  return [2 /*return*/];
11269
11263
  }
11264
+ _a = [videoRef.current.videoWidth, videoRef.current.videoHeight], w = _a[0], h = _a[1];
11265
+ isPortrait = w < h;
11266
+ outputCanvas.current.width = w;
11267
+ outputCanvas.current.height = h;
11270
11268
  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)];
11271
11269
  ctx.drawImage(videoRef.current, 0, 0, w, h);
11272
11270
  ctx.beginPath();