Capturing Videos

OzCapsula (SDK v8.22 and newer)

circle-exclamation

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.

circle-info

If you use our SDK just for capturing videos, omit the Checking Liveness and Face Biometry step.

If a user closes the capturing screen manually, the failedBecauseUserCancelled error appears.

Last updated

Was this helpful?