@hexar/biometric-identity-sdk-core 1.5.0 → 1.7.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 +2 -0
- package/dist/i18n/languages/es-AR.js +2 -0
- package/dist/i18n/languages/es.js +2 -0
- package/dist/i18n/languages/pt-BR.js +2 -0
- package/dist/i18n/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/BiometricIdentitySDK.ts +12 -4
- package/src/i18n/languages/en.ts +2 -0
- package/src/i18n/languages/es-AR.ts +2 -0
- package/src/i18n/languages/es.ts +2 -0
- package/src/i18n/languages/pt-BR.ts +2 -0
- package/src/i18n/types.ts +2 -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
|
|
@@ -117,6 +117,8 @@ exports.en = {
|
|
|
117
117
|
networkError: 'Network error. Please check your connection.',
|
|
118
118
|
timeout: 'Request timeout. Please try again.',
|
|
119
119
|
unknownError: 'An unexpected error occurred.',
|
|
120
|
+
systemBusy: 'Service temporarily unavailable',
|
|
121
|
+
systemBusyMessage: 'Our system is currently processing other requests. Please try again in a few moments.',
|
|
120
122
|
videoTooShort: {
|
|
121
123
|
title: 'Recording Too Short',
|
|
122
124
|
message: 'Video must be at least 8 seconds. Please try again.',
|
|
@@ -117,6 +117,8 @@ exports.esAR = {
|
|
|
117
117
|
networkError: 'Error de red. Verificá tu conexión.',
|
|
118
118
|
timeout: 'Tiempo de espera agotado. Intentá nuevamente.',
|
|
119
119
|
unknownError: 'Ocurrió un error inesperado.',
|
|
120
|
+
systemBusy: 'Servicio temporalmente no disponible',
|
|
121
|
+
systemBusyMessage: 'Nuestro sistema está procesando otras solicitudes en este momento. Por favor, intentá nuevamente en unos instantes.',
|
|
120
122
|
videoTooShort: {
|
|
121
123
|
title: 'Grabación Muy Corta',
|
|
122
124
|
message: 'El video debe durar al menos 8 segundos. Por favor intentá nuevamente.',
|
|
@@ -117,6 +117,8 @@ exports.es = {
|
|
|
117
117
|
networkError: 'Error de red. Verifica tu conexión.',
|
|
118
118
|
timeout: 'Tiempo de espera agotado. Intenta nuevamente.',
|
|
119
119
|
unknownError: 'Ocurrió un error inesperado.',
|
|
120
|
+
systemBusy: 'Servicio temporalmente no disponible',
|
|
121
|
+
systemBusyMessage: 'Nuestro sistema está procesando otras solicitudes en este momento. Por favor, intenta nuevamente en unos instantes.',
|
|
120
122
|
videoTooShort: {
|
|
121
123
|
title: 'Grabación Muy Corta',
|
|
122
124
|
message: 'El video debe durar al menos 8 segundos. Por favor intenta nuevamente.',
|
|
@@ -117,6 +117,8 @@ exports.ptBR = {
|
|
|
117
117
|
networkError: 'Erro de rede. Verifique sua conexão.',
|
|
118
118
|
timeout: 'Tempo esgotado. Tente novamente.',
|
|
119
119
|
unknownError: 'Ocorreu um erro inesperado.',
|
|
120
|
+
systemBusy: 'Serviço temporariamente indisponível',
|
|
121
|
+
systemBusyMessage: 'Nosso sistema está processando outras solicitações no momento. Por favor, tente novamente em alguns instantes.',
|
|
120
122
|
videoTooShort: {
|
|
121
123
|
title: 'Gravação Muito Curta',
|
|
122
124
|
message: 'O vídeo deve durar pelo menos 8 segundos. Por favor, tente novamente.',
|
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
|
@@ -124,6 +124,8 @@ export const en: LanguageStrings = {
|
|
|
124
124
|
networkError: 'Network error. Please check your connection.',
|
|
125
125
|
timeout: 'Request timeout. Please try again.',
|
|
126
126
|
unknownError: 'An unexpected error occurred.',
|
|
127
|
+
systemBusy: 'Service temporarily unavailable',
|
|
128
|
+
systemBusyMessage: 'Our system is currently processing other requests. Please try again in a few moments.',
|
|
127
129
|
videoTooShort: {
|
|
128
130
|
title: 'Recording Too Short',
|
|
129
131
|
message: 'Video must be at least 8 seconds. Please try again.',
|
|
@@ -124,6 +124,8 @@ export const esAR: LanguageStrings = {
|
|
|
124
124
|
networkError: 'Error de red. Verificá tu conexión.',
|
|
125
125
|
timeout: 'Tiempo de espera agotado. Intentá nuevamente.',
|
|
126
126
|
unknownError: 'Ocurrió un error inesperado.',
|
|
127
|
+
systemBusy: 'Servicio temporalmente no disponible',
|
|
128
|
+
systemBusyMessage: 'Nuestro sistema está procesando otras solicitudes en este momento. Por favor, intentá nuevamente en unos instantes.',
|
|
127
129
|
videoTooShort: {
|
|
128
130
|
title: 'Grabación Muy Corta',
|
|
129
131
|
message: 'El video debe durar al menos 8 segundos. Por favor intentá nuevamente.',
|
package/src/i18n/languages/es.ts
CHANGED
|
@@ -124,6 +124,8 @@ export const es: LanguageStrings = {
|
|
|
124
124
|
networkError: 'Error de red. Verifica tu conexión.',
|
|
125
125
|
timeout: 'Tiempo de espera agotado. Intenta nuevamente.',
|
|
126
126
|
unknownError: 'Ocurrió un error inesperado.',
|
|
127
|
+
systemBusy: 'Servicio temporalmente no disponible',
|
|
128
|
+
systemBusyMessage: 'Nuestro sistema está procesando otras solicitudes en este momento. Por favor, intenta nuevamente en unos instantes.',
|
|
127
129
|
videoTooShort: {
|
|
128
130
|
title: 'Grabación Muy Corta',
|
|
129
131
|
message: 'El video debe durar al menos 8 segundos. Por favor intenta nuevamente.',
|
|
@@ -124,6 +124,8 @@ export const ptBR: LanguageStrings = {
|
|
|
124
124
|
networkError: 'Erro de rede. Verifique sua conexão.',
|
|
125
125
|
timeout: 'Tempo esgotado. Tente novamente.',
|
|
126
126
|
unknownError: 'Ocorreu um erro inesperado.',
|
|
127
|
+
systemBusy: 'Serviço temporariamente indisponível',
|
|
128
|
+
systemBusyMessage: 'Nosso sistema está processando outras solicitações no momento. Por favor, tente novamente em alguns instantes.',
|
|
127
129
|
videoTooShort: {
|
|
128
130
|
title: 'Gravação Muito Curta',
|
|
129
131
|
message: 'O vídeo deve durar pelo menos 8 segundos. Por favor, tente novamente.',
|
package/src/i18n/types.ts
CHANGED