Record a video while user scans the document
MobbScan offers you the possibility to record an unattended video of the user in your verification process.
Project configuration
Before starting developing your video step, you should configure some extra things in your project:
Add
MobbScan_UnattendedPlugin.xcframework
fromlibs
folder andTwilio.xcframework
fromlibs/third-party
folder of the SDK to your project.Add MobbScan_UnattendedPlugin and Twilio to the
Embed Frameworks
section on the General tab of your project.Add the property
NSMicrophoneUsageDescription
to your fileInfo.plist
, in order to allow your application to use the microphone.
Quick start
If you want to test the unattended flow or use it without customizing the interface, we provide an interface and flow by default. You can use it easily with only one call to the startUnattendedVideo.
self.mobbscanAPI.startUnattendedVideo(forScanId: scanId, andCompletionBlock: {
(result, resultData, error) in
})
[self.mobbscanAPI startUnattendedVideoForScanId:scanId andCompletionBlock:^(VideoUnattendedResult result, MobbScanVideoDetectionResultData* resultData, NSError* error){
}];
Video timeout
The unattended process has a timeout in order to ensure that the user will not stay in the onboarding for a long period of time.
By default, the maximum duration for the process will be 3 minutes. However, if this time does not suit your needs, you can customise it at the process beginning. The accepted duration is between 1 and 5 minutes, and must be provided in seconds. You can achieve this by using this method:
self.mobbscanAPI.startUnattendedVideo(timeout, scanId:scanId, finishListener: { (result, resultData, error) in
})
[self.mobbscanAPI startUnattendedVideo:timeout
scanId:scanId
finishListener:^(VideoUnattendedResult result, MobbScanVideoDetectionResultData *resultData, NSError *error){
}];
Warning: If you try to start the unattended process with a duration longer than 300 seconds or shorter than 60 seconds, you will receive a
WRONG_PARAMETERS
error.
Interface customization
From version 2.16.18, MobbScan allows developers to customize some visual elements of the unattended onboarding. In these sections you can check which elements are customizable and which properties you can modify.