@hexar/biometric-identity-sdk-core 1.1.2 → 1.1.3
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.
|
@@ -251,9 +251,11 @@ class BiometricIdentitySDK {
|
|
|
251
251
|
currentStep: types_1.SDKStep.VALIDATING,
|
|
252
252
|
progress: 75
|
|
253
253
|
});
|
|
254
|
-
// Reduce number of frames to prevent payload size issues
|
|
254
|
+
// Reduce number of frames to prevent payload size issues
|
|
255
|
+
// For profile picture validation, we need more frames than full validation since we don't have ID images
|
|
256
|
+
// Frames will be compressed below, so we can safely use more frames
|
|
255
257
|
let videoFrames = params.videoFrames;
|
|
256
|
-
const MAX_FRAMES =
|
|
258
|
+
const MAX_FRAMES = 15; // More frames needed for profile picture to detect movement sequences properly
|
|
257
259
|
if (videoFrames.length > MAX_FRAMES) {
|
|
258
260
|
const step = Math.floor(videoFrames.length / MAX_FRAMES);
|
|
259
261
|
videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
|
|
@@ -282,7 +284,7 @@ class BiometricIdentitySDK {
|
|
|
282
284
|
const compressedFrame = this.fixBase64Padding(await this.compressImage(frame));
|
|
283
285
|
validFrames.push(compressedFrame);
|
|
284
286
|
}
|
|
285
|
-
const MIN_FRAMES =
|
|
287
|
+
const MIN_FRAMES = 10; // Minimum frames required for profile picture validation (backend warns if < 10)
|
|
286
288
|
if (validFrames.length < MIN_FRAMES) {
|
|
287
289
|
logger_1.logger.error(`Insufficient valid frames: ${validFrames.length} < ${MIN_FRAMES}`);
|
|
288
290
|
throw this.createError(types_1.BiometricErrorCode.UNKNOWN_ERROR, `Insufficient valid video frames: ${validFrames.length} frames available, minimum ${MIN_FRAMES} required`);
|
package/package.json
CHANGED
|
@@ -335,9 +335,11 @@ export class BiometricIdentitySDK {
|
|
|
335
335
|
progress: 75
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
// Reduce number of frames to prevent payload size issues
|
|
338
|
+
// Reduce number of frames to prevent payload size issues
|
|
339
|
+
// For profile picture validation, we need more frames than full validation since we don't have ID images
|
|
340
|
+
// Frames will be compressed below, so we can safely use more frames
|
|
339
341
|
let videoFrames = params.videoFrames;
|
|
340
|
-
const MAX_FRAMES =
|
|
342
|
+
const MAX_FRAMES = 15; // More frames needed for profile picture to detect movement sequences properly
|
|
341
343
|
if (videoFrames.length > MAX_FRAMES) {
|
|
342
344
|
const step = Math.floor(videoFrames.length / MAX_FRAMES);
|
|
343
345
|
videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
|
|
@@ -371,7 +373,7 @@ export class BiometricIdentitySDK {
|
|
|
371
373
|
validFrames.push(compressedFrame);
|
|
372
374
|
}
|
|
373
375
|
|
|
374
|
-
const MIN_FRAMES =
|
|
376
|
+
const MIN_FRAMES = 10; // Minimum frames required for profile picture validation (backend warns if < 10)
|
|
375
377
|
if (validFrames.length < MIN_FRAMES) {
|
|
376
378
|
logger.error(`Insufficient valid frames: ${validFrames.length} < ${MIN_FRAMES}`);
|
|
377
379
|
throw this.createError(
|