Video recording
The recording video flow records the user while they capture their document and face. The recording is stored with the process as evidence, for regulations or internal policies that require a video of the onboarding.
Before you begin
- Add the
mobbscan-video-androidmodule and theRECORD_AUDIOpermission. See Installation. - Start a process to get a
scanId.
Start the recording
startUnattendedVideo opens a full-screen flow that guides the user through the document and face capture while recording, and closes when it finishes:
- Kotlin
- Java
MobbScanAPI.getInstance().startUnattendedVideo(scanId) { result, resultData, error ->
// The flow has finished
}
MobbScanAPI.getInstance().startUnattendedVideo(scanId, new VideoUnattendedFinishedListener() {
@Override
public void onFinished(VideoUnattendedResult result, MobbScanVideoDetectionResultData resultData, MobbScanAPIError error) {
// The flow has finished
}
});
| Callback value | Description |
|---|---|
VideoUnattendedResult | OK when the flow and the upload of the recording finished correctly; ERROR otherwise |
MobbScanVideoDetectionResultData | Result of the captures made during the recording. Use getMatchingScore() for the face matching score |
MobbScanAPIError | Cause of the error. See Error codes |
Set a maximum duration
The recording stops after 3 minutes by default. Pass a different limit between 61 and 300 seconds; 60 seconds is rejected:
- Kotlin
- Java
MobbScanAPI.getInstance().startUnattendedVideo(scanId, 120) { result, resultData, error -> }
MobbScanAPI.getInstance().startUnattendedVideo(scanId, 120, (result, resultData, error) -> { });
A value outside that range throws an IllegalStateException. When the limit is reached, the flow ends with UNATTENDED_VIDEO_TIMEOUT.
Customize the flow
- Look and feel — colours, sizes, the document confirmation screen and the back button: Theme.
- Texts — change and translate the messages.