Builder
Builder
Liveness WebSDK instance builder for using Livenews WebSDK
build
Builds the SDK interface that can be started and destroyed.
build(): LivenessSDK;
Returns:
Type | Description |
---|---|
LivenessSDK | the SDK interface |
inspect
Inspects the passed configuration for debugging.
inspect(): void;
setCompressionAlgorithm
Sets the compression algorithm options.
setCompressionAlgorithm(algorithm: CompressionAlgorithm): Builder;
Parameters:
Name | Type | Description |
---|---|---|
algorithm | CompressionAlgorithm | the compression algorithm options |
Returns:
Type | Description |
---|---|
Builder | this builder |
setContent
Sets the text content of the SDK to the desired text. Usually used for translation.
setContent(content: LivenessContentConfiguration): Builder;
Parameters:
Name | Type | Description |
---|---|---|
content | LivenessContentConfiguration | the text and image content to replace |
Returns:
Type | Description |
---|---|
Builder | this builder |
setCredential
Sets the credential to generate image signature for authenticity checking.
setCredential(credential: Credential): Builder;
Parameters:
Name | Type | Description |
---|---|---|
credential | Credential | credential used to generate image signature |
Returns:
Type | Description |
---|---|
Builder | this builder |
setDisruptDuration
Duration from the start of show camera preview till disrupt detection enabled.
setDisruptDuration(duration: number): Builder;
Parameters:
Name | Type | Description |
---|---|---|
duration | number | the timeout duration from the start of show camera preview till disrupt detection enabled in millisecond |
Returns:
Type | Description |
---|---|
Builder | this builder |
setInstruction
Sets the instruction configuration.
setInstruction(instructions: Instruction[], options: InstructionOptions): Builder;
Parameters:
Name | Type | Description |
---|---|---|
instructions | Instruction[] | an array of instructions made available to appear in instruction randomization. |
options | InstructionOptions | more instruction parameters |
Returns:
Type | Description |
---|---|
Builder | this builder |
Image:
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:
Name | Type | Description |
---|---|---|
proxy | ProxyMiddleware | endpoint proxy collection to be used |
Returns:
Type | Description |
---|---|
Builder | this builder |
setScreenOrientation
Sets the preferred orientation to be forced when capturing photo.
setScreenOrientation(orientation: ScreenOrientation): Builder;
Parameters:
Name | Type | Description |
---|---|---|
orientation | ScreenOrientation | the preferred orientation |
Returns:
Type | Description |
---|---|
Builder | this 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:
Name | Type | Description |
---|---|---|
duration | number | the timeout duration from the start of verification page appearance |
Returns:
Type | Description |
---|---|
Builder | this builder |
setTheme
Sets the theme configuration for the SDK.
setTheme(theme: LivenessThemeConfiguration): Builder;
Parameters:
Name | Type | Description |
---|---|---|
theme | LivenessThemeConfiguration | theme configurations |
Returns:
Type | Description |
---|---|
Builder | this builder |
setURL
Sets the SDK base path for starting the SDK.
setURL(url: string): Builder;
Parameters:
Name | Type | Description |
---|---|---|
url | string | the SDK base path |
Returns:
Type | Description |
---|---|
Builder | this 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:
Name | Type | Description |
---|---|---|
labels | string[] | array of strings to be checked |
Returns:
Type | Description |
---|---|
Builder | this builder |
Updated 4 months ago