@hexar/biometric-identity-sdk-core 1.1.0 → 1.1.1

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,10 +251,21 @@ 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 (same as validateIdentity)
255
+ let videoFrames = params.videoFrames;
256
+ const MAX_FRAMES = 5; // Reduced to 5 to reduce payload size and processing time
257
+ if (videoFrames.length > MAX_FRAMES) {
258
+ const step = Math.floor(videoFrames.length / MAX_FRAMES);
259
+ videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
260
+ logger_1.logger.info('Sampled frames for profile picture validation', {
261
+ originalCount: params.videoFrames.length,
262
+ sampledCount: videoFrames.length
263
+ });
264
+ }
254
265
  // Perform backend validation
255
266
  const response = await this.backendClient.validateProfilePicture({
256
267
  sessionId: params.sessionId,
257
- videoFrames: params.videoFrames,
268
+ videoFrames: videoFrames,
258
269
  videoDurationMs: params.videoDurationMs,
259
270
  challengesCompleted: params.challengesCompleted,
260
271
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexar/biometric-identity-sdk-core",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Core AI engine for biometric identity verification",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -335,10 +335,22 @@ export class BiometricIdentitySDK {
335
335
  progress: 75
336
336
  });
337
337
 
338
+ // Reduce number of frames to prevent payload size issues (same as validateIdentity)
339
+ let videoFrames = params.videoFrames;
340
+ const MAX_FRAMES = 5; // Reduced to 5 to reduce payload size and processing time
341
+ if (videoFrames.length > MAX_FRAMES) {
342
+ const step = Math.floor(videoFrames.length / MAX_FRAMES);
343
+ videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
344
+ logger.info('Sampled frames for profile picture validation', {
345
+ originalCount: params.videoFrames.length,
346
+ sampledCount: videoFrames.length
347
+ });
348
+ }
349
+
338
350
  // Perform backend validation
339
351
  const response = await this.backendClient.validateProfilePicture({
340
352
  sessionId: params.sessionId,
341
- videoFrames: params.videoFrames,
353
+ videoFrames: videoFrames,
342
354
  videoDurationMs: params.videoDurationMs,
343
355
  challengesCompleted: params.challengesCompleted,
344
356
  });