Skip to content

Setting up timeouts#

Adjusting timeouts in LUNA ID lets you maintain resource efficiency, enhance user experience, and ensure security compliance.

Face fixing timeout#

Applies to LUNA ID for iOS only.

After a video session starts, LUNA ID waits for a face to appear in the frame for further processing. You can set a timeout, in seconds, within which the face should appear in the frame. If the face does not appear in the frame after this timeout, the session will be terminated with the 1028 error.

To set the timeout, use the LCLunaConfiguration.emptyFrameTime property. The default value is 0.

Best shot timeouts#

You can set up timeouts to configure the process of getting the best shot.

Before starting face recognition#

You can set an optional delay or specific moment in time to define when the face recognition will start after the camera is displayed in the screen.

To do this in LUNA ID for Android, use the StartBestShotSearchCommand command.

To do this in LUNA ID for iOS, use LCLunaConfiguration.startDelay.

Before getting the best shot#

You can an optional a delay, to define for how long a user's face should be placed in the face detection bounding box before the best shot is taken.

To do this in LUNA ID for Android, use the LunaID.foundFaceDelayMs parameter. The default value is 0 milliseconds.

To do this in LUNA ID for iOS, define the LCLunaConfiguration::faceTime property. The default value is 5 seconds. In case, the face disappears from the bounding box within the specified period, the BestShotError.FACE_LOST will be caught in the LCBestShotDelegate::bestShotError delegate.

Dynamic Liveness estimation timeouts#

Interaction timeout#

For each interaction, you can specify the time during which an interaction must be completed. The timeout is specified in milliseconds in LUNA ID for Android and in seconds in LUNA ID for iOS.

To do this in LUNA ID for Android, use the timeoutMs parameter. By default, the parameter value is 5 seconds.

To do this in LUNA ID for iOS, pass the interactionTimeout parameter to the following property of the LCLunaConfiguration class:

@property (nonatomic, strong) LCInteractionsConfig *interactionsConfig;

By default, the parameter value is 5 seconds.

If an interaction was not completed within the allotted time, the 1007 error appears.

Timeout between interactions#

You can set a timeout between interactions, in milliseconds in LUNA ID for Android and in seconds in LUNA ID for iOS. This means that a new interaction will start after the preceding one ends after the specified timeout is passed.

To do this in LUNA ID for Android, use the LunaConfig.interactionDelayMs parameter. By default, the parameter value is 0.

To do this in LUNA ID for iOS, use the LCLunaConfiguration.interactionsConfig.timeoutBetweenInteractions property. By default, the property value is set to 0.