@hexar/biometric-identity-sdk-react-native 1.1.12 → 1.1.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../src/components/VideoRecorder.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAmC,MAAM,oCAAoC,CAAC;AAE1I,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,UAAU,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACtD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,C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,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiDD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAi3BtD,CAAC;AA4OF,eAAe,aAAa,CAAC"}
|
|
@@ -321,8 +321,11 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
321
321
|
}
|
|
322
322
|
biometric_identity_sdk_core_1.logger.info('Using frames for completion:', finalFrames.length, 'frames');
|
|
323
323
|
let finalCompletedChallenges = completedChallenges;
|
|
324
|
-
if (smartMode && finalCompletedChallenges.length === 0
|
|
325
|
-
|
|
324
|
+
if (smartMode && finalCompletedChallenges.length === 0) {
|
|
325
|
+
const challengesToUse = challenges.length > 0 ? challenges : propChallenges || [];
|
|
326
|
+
if (challengesToUse.length > 0) {
|
|
327
|
+
finalCompletedChallenges = challengesToUse.map(c => c.action);
|
|
328
|
+
}
|
|
326
329
|
}
|
|
327
330
|
const result = {
|
|
328
331
|
frames: finalFrames,
|
|
@@ -332,7 +335,15 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
332
335
|
challengesCompleted: finalCompletedChallenges,
|
|
333
336
|
sessionId,
|
|
334
337
|
};
|
|
335
|
-
biometric_identity_sdk_core_1.logger.info('Video recording completed:',
|
|
338
|
+
biometric_identity_sdk_core_1.logger.info('Video recording completed:', {
|
|
339
|
+
frames: result.frames.length,
|
|
340
|
+
duration: (actualDuration / 1000).toFixed(1) + 's',
|
|
341
|
+
challengesCompleted: result.challengesCompleted,
|
|
342
|
+
challengesCompletedCount: result.challengesCompleted.length,
|
|
343
|
+
smartMode,
|
|
344
|
+
challengesLength: challenges.length,
|
|
345
|
+
propChallengesLength: propChallenges?.length || 0
|
|
346
|
+
});
|
|
336
347
|
isRecordingRef.current = false;
|
|
337
348
|
onComplete(result);
|
|
338
349
|
}
|
|
@@ -342,7 +353,7 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
342
353
|
setOverallProgress(0);
|
|
343
354
|
handleRecordingError(error);
|
|
344
355
|
}
|
|
345
|
-
}, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
|
|
356
|
+
}, [frames, completedChallenges, challenges, propChallenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
|
|
346
357
|
const startFrameCapture = (0, react_1.useCallback)(() => {
|
|
347
358
|
if (cameraRef.current && device) {
|
|
348
359
|
biometric_identity_sdk_core_1.logger.info('Starting frame capture');
|
package/package.json
CHANGED
|
@@ -386,8 +386,11 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
386
386
|
logger.info('Using frames for completion:', finalFrames.length, 'frames');
|
|
387
387
|
|
|
388
388
|
let finalCompletedChallenges = completedChallenges;
|
|
389
|
-
if (smartMode && finalCompletedChallenges.length === 0
|
|
390
|
-
|
|
389
|
+
if (smartMode && finalCompletedChallenges.length === 0) {
|
|
390
|
+
const challengesToUse = challenges.length > 0 ? challenges : propChallenges || [];
|
|
391
|
+
if (challengesToUse.length > 0) {
|
|
392
|
+
finalCompletedChallenges = challengesToUse.map(c => c.action);
|
|
393
|
+
}
|
|
391
394
|
}
|
|
392
395
|
|
|
393
396
|
const result: VideoRecordingResult = {
|
|
@@ -399,7 +402,15 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
399
402
|
sessionId,
|
|
400
403
|
};
|
|
401
404
|
|
|
402
|
-
logger.info('Video recording completed:',
|
|
405
|
+
logger.info('Video recording completed:', {
|
|
406
|
+
frames: result.frames.length,
|
|
407
|
+
duration: (actualDuration / 1000).toFixed(1) + 's',
|
|
408
|
+
challengesCompleted: result.challengesCompleted,
|
|
409
|
+
challengesCompletedCount: result.challengesCompleted.length,
|
|
410
|
+
smartMode,
|
|
411
|
+
challengesLength: challenges.length,
|
|
412
|
+
propChallengesLength: propChallenges?.length || 0
|
|
413
|
+
});
|
|
403
414
|
|
|
404
415
|
isRecordingRef.current = false;
|
|
405
416
|
onComplete(result);
|
|
@@ -409,7 +420,7 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
409
420
|
setOverallProgress(0);
|
|
410
421
|
handleRecordingError(error);
|
|
411
422
|
}
|
|
412
|
-
}, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
|
|
423
|
+
}, [frames, completedChallenges, challenges, propChallenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
|
|
413
424
|
|
|
414
425
|
const startFrameCapture = useCallback(() => {
|
|
415
426
|
if (cameraRef.current && device) {
|