Skip to content

Process Customization

This article outlines the available Face SDK process customization options.

Session Video Recording

You can decide whether to record the liveness assessment session and how to save the video to the server:

  • Record the session and send the video to the server with an additional request (default setting). This provides quicker user response, but there's a risk of video loss if the application is closed before transmission completion.
  • Record the session and send the video to the server with a Liveness package. This may result in longer response times, as the response appears only after the package reaches the server completely.
  • Disable video recording.

Recording the session and sending the video to the server with an additional request:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .asynchronousUpload
}

FaceSDK.service.startLiveness(from: viewController,
                        animated: true,
                    configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessAsynchronousUpload;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
                            animated:YES
                        configuration:configuration
                        onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
            .setRecordingProcess(RecordingProcess.ASYNCHRONOUS_UPLOAD)
            .build()
FaceSDK.Instance().startLiveness(
        context,
        configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
                .setRecordingProcess(RecordingProcess.ASYNCHRONOUS_UPLOAD)
                .build();
FaceSDK.Instance().startLiveness(context,
        configuration,
        response -> {

        });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
}, _ => { }, _ => { });
FaceSDK.startLivenessWithConfig({
  "recordingProcess": RecordingProcess.ASYNCHRONOUS_UPLOAD,
});
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
}, function (m) { }, function (e) { });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
});

Recording the session and sending the video to the server with a Liveness package:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .synchronousUpload
}

FaceSDK.service.startLiveness(from: viewController,
                        animated: true,
                    configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessSynchronousUpload;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
                            animated:YES
                        configuration:configuration
                        onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
            .setRecordingProcess(RecordingProcess.SYNCHRONOUS_UPLOAD)
            .build()
FaceSDK.Instance().startLiveness(
        context,
        configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
                .setRecordingProcess(RecordingProcess.SYNCHRONOUS_UPLOAD)
                .build();
FaceSDK.Instance().startLiveness(context,
        configuration,
        response -> {

        });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
}, _ => { }, _ => { });
FaceSDK.startLivenessWithConfig({
  "recordingProcess": RecordingProcess.SYNCHRONOUS_UPLOAD,
});
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
}, function (m) { }, function (e) { });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
});

Disabling the session recording:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .notUpload
}

FaceSDK.service.startLiveness(from: viewController, 
                          animated: true,  
                     configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessNotUpload;
  }];

[RFSFaceSDK.service startLivenessFrom:viewController
                             animated:YES
                        configuration:configuration
                           onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
            .setRecordingProcess(RecordingProcess.NOT_UPLOAD)
            .build()
FaceSDK.Instance().startLiveness(
        context,
        configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
                .setRecordingProcess(RecordingProcess.NOT_UPLOAD)
                .build();
FaceSDK.Instance().startLiveness(context,
        configuration,
        response -> {

        });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.NOT_UPLOAD
}, _ => { }, _ => { });
FaceSDK.startLivenessWithConfig({
  "recordingProcess": RecordingProcess.NOT_UPLOAD,
});
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.NOT_UPLOAD
}, function (m) { }, function (e) { });
FaceSDK.startLivenessWithConfig({
  recordingProcess: RecordingProcess.NOT_UPLOAD
});