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.xcframeworkandTwilioVideo.xcframework(Embed & Sign) andNSMicrophoneUsageDescription. 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:
- Swift
- Objective-C
MobbScanAPI.getInstance().startUnattendedVideo(forScanId: scanId) { result, resultData, error in
// The flow has finished
}
[[MobbScanAPI getInstance] startUnattendedVideoForScanId:scanId
andCompletionBlock:^(VideoUnattendedResult result, MobbScanVideoDetectionResultData *resultData, NSError *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 |
NSError | Cause 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:
- Swift
- Objective-C
MobbScanAPI.getInstance().startUnattendedVideo(120, scanId: scanId) { result, resultData, error in }
[[MobbScanAPI getInstance] startUnattendedVideo:120 scanId:scanId
finishListener:^(VideoUnattendedResult result, MobbScanVideoDetectionResultData *resultData, NSError *error) { }];
A value outside that range returns WRONG_PARAMETERS_ERROR.
Customize the flow
- Look and feel — colours, sizes and the document confirmation screen: Theme.
- Texts — change and translate the messages.