Class: SessionResult

verid.SessionResult(json)

Session result JSON schema

Constructor

new SessionResult(json)

Parameters:
Name Type Description
json Object JSON object received from the API call
Properties:
Name Type Attributes Description
outcome module:verid.SessionOutcome Outcome of the session
face module:verid~Face <optional>
Detected face
bearing module:verid.Bearing <optional>
Bearing of the detected face
image string <optional>
Data URI scheme image in which the face was detected
constituentResults Array.<module:verid.SessionResult> Array of results that constitute the final result – the app collects 1 or more results before the session finishes
Source:

Methods

getFaceComparisonTemplates(bearingopt)

Get face templates that can be used in comparison functions
Parameters:
Name Type Attributes Description
bearing module:verid.Bearing <optional>
Limit to templates extracted from faces with the given bearing
Source:

getFaceImages(bearingopt)

Get face and image pairs captured in the session
Parameters:
Name Type Attributes Description
bearing module:verid.Bearing <optional>
Limit to entries with faces of the given bearing
Source:

getFaces(bearingopt)

Get faces captured in the session
Parameters:
Name Type Attributes Description
bearing module:verid.Bearing <optional>
Limit the faces to the given bearing
Source:

getImages(bearingopt)

Get images captured in the session
Parameters:
Name Type Attributes Description
bearing module:verid.Bearing <optional>
Limit to images with faces of the given bearing
Source:
Example
var sessionResult; // Received in a session callback
var images = sessionResult.getImages(verid.Bearing.STRAIGHT);
if (images.length > 0) {
   // The images are encoded using data URI scheme, e.g., "data:image/jpeg;base64,imagedatahere"
   // You can pass this value directly to a Javascript image element
   document.getElementById("image").src = images[0];
}