Builder

Builder

Liveness WebSDK instance builder for using Livenews WebSDK

build

Builds the SDK interface that can be started and destroyed.

build(): LivenessSDK;

Returns:

TypeDescription
LivenessSDKthe SDK interface

inspect

Inspects the passed configuration for debugging.

inspect(): void;

setCompressionAlgorithm

Sets the compression algorithm options.

setCompressionAlgorithm(algorithm: CompressionAlgorithm): Builder;

Parameters:

NameTypeDescription
algorithmCompressionAlgorithmthe compression algorithm options

Returns:

TypeDescription
Builderthis builder

setContent

Sets the text content of the SDK to the desired text. Usually used for translation.

setContent(content: LivenessContentConfiguration): Builder;

Parameters:

NameTypeDescription
contentLivenessContentConfigurationthe text and image content to replace

Returns:

TypeDescription
Builderthis builder

setCredential

Sets the credential to generate image signature for authenticity checking.

setCredential(credential: Credential): Builder;

Parameters:

NameTypeDescription
credentialCredentialcredential used to generate image signature

Returns:

TypeDescription
Builderthis builder

setDisruptDuration

Duration from the start of show camera preview till disrupt detection enabled.

setDisruptDuration(duration: number): Builder;

Parameters:

NameTypeDescription
durationnumberthe timeout duration from the start of show camera preview till disrupt detection enabled in millisecond

Returns:

TypeDescription
Builderthis builder

setInstruction

Sets the instruction configuration.

setInstruction(instructions: Instruction[], options: InstructionOptions): Builder;

Parameters:

NameTypeDescription
instructionsInstruction[]an array of instructions made available to appear in instruction randomization.
optionsInstructionOptionsmore instruction parameters

Returns:

TypeDescription
Builderthis builder

Image:

Verification content names/paths on running verification

Verification content names/paths on running verification

📘

Note

The running verification screen will only be shown when the active liveness model is running

setProxyMiddleware

Sets the endpoint url proxy collection to be used for the SDK.

setProxyMiddleware(proxy: ProxyMiddleware): Builder;

Parameters:

NameTypeDescription
proxyProxyMiddlewareendpoint proxy collection to be used

Returns:

TypeDescription
Builderthis builder

setScreenOrientation

Sets the preferred orientation to be forced when capturing photo.

setScreenOrientation(orientation: ScreenOrientation): Builder;

Parameters:

NameTypeDescription
orientationScreenOrientationthe preferred orientation

Returns:

TypeDescription
Builderthis builder

setTimeout

Sets the timeout duration from the start of verification page appearance. After this timeout expires, the SDK will post Verification.Timeout message.

setTimeout(duration: number): Builder;

Parameters:

NameTypeDescription
durationnumberthe timeout duration from the start of verification page appearance

Returns:

TypeDescription
Builderthis builder

setTheme

Sets the theme configuration for the SDK.

setTheme(theme: LivenessThemeConfiguration): Builder;

Parameters:

NameTypeDescription
themeLivenessThemeConfigurationtheme configurations

Returns:

TypeDescription
Builderthis builder

setURL

Sets the SDK base path for starting the SDK.

setURL(url: string): Builder;

Parameters:

NameTypeDescription
urlstringthe SDK base path

Returns:

TypeDescription
Builderthis builder

setVirtualCameraLabel

Sets an array of string of blacklisted camera name substring. Will post Camera.NotAllowed if there is an available camera with blacklisted camera name substring.

setVirtualCameraLabel(labels: string[]): Builder;

Parameters:

NameTypeDescription
labelsstring[]array of strings to be checked

Returns:

TypeDescription
Builderthis builder