@hexar/biometric-identity-sdk-core 1.0.16 → 1.0.17

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.
@@ -82,7 +82,7 @@ export declare class BiometricIdentitySDK {
82
82
  /**
83
83
  * Compress base64 image - simplified version that works in all environments
84
84
  * For React Native, images should be compressed at capture time
85
- * This is a no-op for now - compression should happen at capture time in React Native
85
+ * This reduces large images by skipping compression if already small enough
86
86
  */
87
87
  private compressImage;
88
88
  /**
@@ -299,7 +299,7 @@ class BiometricIdentitySDK {
299
299
  minimumRequired: 10
300
300
  });
301
301
  }
302
- const MAX_FRAMES = 20;
302
+ const MAX_FRAMES = 15;
303
303
  if (videoFrames.length > MAX_FRAMES) {
304
304
  const step = Math.floor(videoFrames.length / MAX_FRAMES);
305
305
  videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
@@ -419,13 +419,13 @@ class BiometricIdentitySDK {
419
419
  /**
420
420
  * Compress base64 image - simplified version that works in all environments
421
421
  * For React Native, images should be compressed at capture time
422
- * This is a no-op for now - compression should happen at capture time in React Native
422
+ * This reduces large images by skipping compression if already small enough
423
423
  */
424
424
  async compressImage(base64Image) {
425
425
  if (!base64Image || base64Image.length === 0) {
426
426
  return base64Image;
427
427
  }
428
- const MAX_SIZE = 1024 * 1024;
428
+ const MAX_SIZE = 500 * 1024;
429
429
  if (base64Image.length < MAX_SIZE) {
430
430
  return base64Image;
431
431
  }
@@ -438,6 +438,7 @@ class BiometricIdentitySDK {
438
438
  catch (error) {
439
439
  logger_1.logger.warn('Image compression not available, using original', error);
440
440
  }
441
+ logger_1.logger.warn(`Image too large (${Math.round(base64Image.length / 1024)}KB) but compression not available`);
441
442
  return base64Image;
442
443
  }
443
444
  /**
@@ -16,7 +16,7 @@ class BackendClient {
16
16
  this.config = {
17
17
  apiEndpoint: config.apiEndpoint.replace(/\/$/, ''),
18
18
  apiKey: config.apiKey,
19
- timeout: config.timeout || 60000,
19
+ timeout: config.timeout || 120000,
20
20
  };
21
21
  this.sdkSessionId = this.generateSDKSessionId();
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexar/biometric-identity-sdk-core",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Core AI engine for biometric identity verification",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -381,7 +381,7 @@ export class BiometricIdentitySDK {
381
381
  });
382
382
  }
383
383
 
384
- const MAX_FRAMES = 20;
384
+ const MAX_FRAMES = 15;
385
385
  if (videoFrames.length > MAX_FRAMES) {
386
386
  const step = Math.floor(videoFrames.length / MAX_FRAMES);
387
387
  videoFrames = videoFrames.filter((_, index) => index % step === 0).slice(0, MAX_FRAMES);
@@ -524,14 +524,14 @@ export class BiometricIdentitySDK {
524
524
  /**
525
525
  * Compress base64 image - simplified version that works in all environments
526
526
  * For React Native, images should be compressed at capture time
527
- * This is a no-op for now - compression should happen at capture time in React Native
527
+ * This reduces large images by skipping compression if already small enough
528
528
  */
529
529
  private async compressImage(base64Image: string): Promise<string> {
530
530
  if (!base64Image || base64Image.length === 0) {
531
531
  return base64Image;
532
532
  }
533
533
 
534
- const MAX_SIZE = 1024 * 1024;
534
+ const MAX_SIZE = 500 * 1024;
535
535
  if (base64Image.length < MAX_SIZE) {
536
536
  return base64Image;
537
537
  }
@@ -545,6 +545,7 @@ export class BiometricIdentitySDK {
545
545
  logger.warn('Image compression not available, using original', error);
546
546
  }
547
547
 
548
+ logger.warn(`Image too large (${Math.round(base64Image.length / 1024)}KB) but compression not available`);
548
549
  return base64Image;
549
550
  }
550
551
 
@@ -141,7 +141,7 @@ export class BackendClient {
141
141
  this.config = {
142
142
  apiEndpoint: config.apiEndpoint.replace(/\/$/, ''),
143
143
  apiKey: config.apiKey,
144
- timeout: config.timeout || 60000,
144
+ timeout: config.timeout || 120000,
145
145
  };
146
146
  this.sdkSessionId = this.generateSDKSessionId();
147
147
  }