Skip to main content

Capture results

Every successful session returns one continuous video and a set of frames sampled from the same capture interval.

Result properties​

PropertyTypeContents
capturedVideoDataByteArray?Complete captured MP4. The device selects a supported codec.
framesList<ByteArray?>Sampled JPEG frames; three by default.
faceImageByteArray?Representative JPEG selected from the sampled frames.
faceGeometryList<MBFaceGeometryModel>Geometry for the sampled frames.
versionIdString?Selected constraint version: v1, v2, or v3.
sessionMetadataString?Authenticated metadata for the sampled frames.
sessionVideoMetadataString?Authenticated metadata for the exact MP4 bytes.

The front-camera preview is mirrored for the user. Captured images and video are stored unmirrored.

Read the result​

override fun onSuccess(result: MBCaptureSessionResult?) {
result ?: return

val videoBytes = result.capturedVideoData
val sampledFrames = result.frames
val recognitionImage = result.faceImage
val frameGeometry = result.faceGeometry
val constraintVersion = result.versionId
}

Serialize the biometric request​

val biometricRequest = result.serializedData()
// Send biometricRequest to the matching backend endpoint.

serializedData() contains faceImage, frames, and the selected constraint version. The video is exposed separately through capturedVideoData.

Use authenticated session metadata​

Set sessionId before adding the predefined fragment, or pass it when starting the custom service:

captureFragment.sessionId = sessionId

// Custom UI:
captureService.startCamera(sessionId)

After capture, send each metadata value with the media it authenticates:

  • sessionMetadata with the sampled frame payload
  • sessionVideoMetadata with the unchanged capturedVideoData

Do not re-encode or modify the MP4 before using its video metadata because the metadata authenticates the exact captured bytes.