Skip to main content

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 MobbScan_UnattendedPlugin.xcframework and TwilioVideo.xcframework (Embed & Sign) and NSMicrophoneUsageDescription. See Installation.
  • Start a process to get a scanId.

Start the recording​

startUnattendedVideo presents a full-screen flow that guides the user through the document and face capture while recording, and dismisses it when it finishes:

MobbScanAPI.getInstance().startUnattendedVideo(forScanId: scanId) { result, resultData, error in
// The flow has finished
}
Callback valueDescription
VideoUnattendedResultOK when the flow and the upload of the recording finished correctly; ERROR otherwise
MobbScanVideoDetectionResultDataResult of the captures made during the recording
NSErrorCause of the error. See Error codes

Set a maximum duration​

The recording stops after 3 minutes by default. Pass a different limit, in seconds, between 60 and 300:

MobbScanAPI.getInstance().startUnattendedVideo(120, scanId: scanId) { result, resultData, error in }

A value outside that range returns WRONG_PARAMETERS_ERROR.

Customize the flow​