Capturing Videos
OzCapsula (SDK v8.22 and newer)
Please note: all required data (other than the video) must be packaged into the container before starting the Liveness screen.
Create a controller that will capture videos as follows:
getSessionToken() { sessionToken in
DispatchQueue.main.async {
do {
let action:OZVerificationMovement = .selfie
let mediaRequest = MediaRequest.action(action)
let profile = AnalysisProfile(mediaList: [mediaRequest],
type: .quality,
params: [:] )
let request = CaptureRequest(analysisProfileList: [profile], cameraPosition: .front)
let ozLivenessVC = try OZSDK.createMediaCaptureScreen(self, request, sessionToken: sessionToken)
self.present(ozLivenessVC, animated: true)
} catch let error {
print(error.localizedDescription)
}
}
}The delegate object must implement the OZLivenessDelegate protocol:
SDK 8.21 and older
Create a controller that will capture videos as follows:
action – a list of user’s actions while capturing the video.
Once video is captured, the system calls the onOZLivenessResult method:
The method returns the results of video capturing: the [OZMedia] objects. The system uses these objects to perform checks.
If a user closes the capturing screen manually, the failedBecauseUserCancelled error appears.
Last updated
Was this helpful?
