@hexar/biometric-identity-sdk-core 1.4.0 → 1.6.0
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/BiometricIdentitySDK.js +12 -4
- package/dist/i18n/languages/en.js +1 -0
- package/dist/i18n/languages/es-AR.js +1 -0
- package/dist/i18n/languages/es.js +1 -0
- package/dist/i18n/languages/pt-BR.js +1 -0
- package/dist/i18n/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/BiometricIdentitySDK.ts +12 -4
- package/src/i18n/languages/en.ts +1 -0
- package/src/i18n/languages/es-AR.ts +1 -0
- package/src/i18n/languages/es.ts +1 -0
- package/src/i18n/languages/pt-BR.ts +1 -0
- package/src/i18n/types.ts +1 -0
|
@@ -254,8 +254,12 @@ class BiometricIdentitySDK {
|
|
|
254
254
|
let videoFrames = params.videoFrames;
|
|
255
255
|
const MAX_FRAMES = 15;
|
|
256
256
|
if (videoFrames.length > MAX_FRAMES) {
|
|
257
|
-
const
|
|
258
|
-
|
|
257
|
+
const sampled = [];
|
|
258
|
+
for (let i = 0; i < MAX_FRAMES; i++) {
|
|
259
|
+
const idx = Math.round(i * (videoFrames.length - 1) / (MAX_FRAMES - 1));
|
|
260
|
+
sampled.push(videoFrames[idx]);
|
|
261
|
+
}
|
|
262
|
+
videoFrames = sampled;
|
|
259
263
|
logger_1.logger.info('Sampled frames for profile picture validation', {
|
|
260
264
|
originalCount: params.videoFrames.length,
|
|
261
265
|
sampledCount: videoFrames.length
|
|
@@ -385,8 +389,12 @@ class BiometricIdentitySDK {
|
|
|
385
389
|
// (150–300 ms) was statistically unlikely to be captured in any frame.
|
|
386
390
|
const MAX_FRAMES = 15;
|
|
387
391
|
if (videoFrames.length > MAX_FRAMES) {
|
|
388
|
-
const
|
|
389
|
-
|
|
392
|
+
const sampled = [];
|
|
393
|
+
for (let i = 0; i < MAX_FRAMES; i++) {
|
|
394
|
+
const idx = Math.round(i * (videoFrames.length - 1) / (MAX_FRAMES - 1));
|
|
395
|
+
sampled.push(videoFrames[idx]);
|
|
396
|
+
}
|
|
397
|
+
videoFrames = sampled;
|
|
390
398
|
logger_1.logger.info('Sampled frames for validation', {
|
|
391
399
|
originalCount: this.state.videoData.frames.length,
|
|
392
400
|
sampledCount: videoFrames.length
|
package/dist/i18n/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -338,8 +338,12 @@ export class BiometricIdentitySDK {
|
|
|
338
338
|
let videoFrames = params.videoFrames;
|
|
339
339
|
const MAX_FRAMES = 15;
|
|
340
340
|
if (videoFrames.length > MAX_FRAMES) {
|
|
341
|
-
const
|
|
342
|
-
|
|
341
|
+
const sampled: string[] = [];
|
|
342
|
+
for (let i = 0; i < MAX_FRAMES; i++) {
|
|
343
|
+
const idx = Math.round(i * (videoFrames.length - 1) / (MAX_FRAMES - 1));
|
|
344
|
+
sampled.push(videoFrames[idx]);
|
|
345
|
+
}
|
|
346
|
+
videoFrames = sampled;
|
|
343
347
|
logger.info('Sampled frames for profile picture validation', {
|
|
344
348
|
originalCount: params.videoFrames.length,
|
|
345
349
|
sampledCount: videoFrames.length
|
|
@@ -498,8 +502,12 @@ export class BiometricIdentitySDK {
|
|
|
498
502
|
// (150–300 ms) was statistically unlikely to be captured in any frame.
|
|
499
503
|
const MAX_FRAMES = 15;
|
|
500
504
|
if (videoFrames.length > MAX_FRAMES) {
|
|
501
|
-
const
|
|
502
|
-
|
|
505
|
+
const sampled: string[] = [];
|
|
506
|
+
for (let i = 0; i < MAX_FRAMES; i++) {
|
|
507
|
+
const idx = Math.round(i * (videoFrames.length - 1) / (MAX_FRAMES - 1));
|
|
508
|
+
sampled.push(videoFrames[idx]);
|
|
509
|
+
}
|
|
510
|
+
videoFrames = sampled;
|
|
503
511
|
logger.info('Sampled frames for validation', {
|
|
504
512
|
originalCount: this.state.videoData.frames.length,
|
|
505
513
|
sampledCount: videoFrames.length
|
package/src/i18n/languages/en.ts
CHANGED
package/src/i18n/languages/es.ts
CHANGED