For the complete documentation index, see llms.txt. This page is also available as Markdown.

Video recording - Videorecording

Introduction

Screen video recording is performed with the VideoRecording Component.

This component captures the device screen in the background. It is primarily intended for recording the onboarding process.


Dependency

The component-specific dependency is:

implementation "com.facephi.androidsdk:video_recording_component:$version"

Available Controllers

Controller

Description

VideoRecordingController

Main video recording controller.

StopVideoRecordingController

Controller for stopping video recording.



Simplified Launch

Once the SDK has been initialized and a new operation has been created, the component can be launched. Any of its controllers can be used to run its functionality.

Starting the capture

To start screen recording:

Stopping the capture

To stop screen recording:

Receiving errors

Errors are returned as a 'VideoRecordingError' object.

List of errors:

  • VRC_CANCEL_BY_USER: The user canceled the process

  • VRC_COMPONENT_LICENSE_ERROR: The component license is invalid

  • VRC_EMPTY_LICENSE: The license string is empty

  • VRC_INITIALIZATION_ERROR: Initialization error

  • VRC_OPERATION_NOT_CREATED: No operation is in progress

  • VRC_NETWORK_CONNECTION: Internet connection error

  • VRC_PERMISSION_ERROR: The user denied the required permissions. With enableAudio=true this also covers denial or dismissal of the microphone permission request and denial of the MediaProjection.

  • VRC_SOCKET_ERROR: Error connecting to services

  • VRC_UNKNOWN_ERROR: Unknown error

  • VRC_VIDEO_CALL_ACTIVE: Cannot start because a video call is active

  • VRC_VIDEO_ERROR: Error processing the video

  • VRC_VIDEO_RECORDING_ACTIVE: Cannot start because the video recording process is active

  • VRC_FETCH_DATA_ERROR: Error retrieving the result

Receiving the successful result - data

On success, the data field contains a VideoRecordingResult.

  • state: Recording state. SHARING indicates that recording has started, and FINISH indicates that it has stopped successfully.

Advanced information

This section provides more information about the component.

Advanced component configuration

To launch the current component, you must create a VideoRecordingConfigurationData object, which will configure the component controller.

All the fields that are part of this class are described below.

The fields url, apiKey and tenantId normally do not need to be provided since they are populated internally through the license used.

These fields are usually provided only when the server is On-Premise.

url

Video socket path

apiKey

ApiKey required to connect to the video socket

tenantId

Tenant identifier referring to the current customer, required to connect to the video service.

enableAudio

Enables audio capture during screen recording. By default false. When set to true, Android requests RECORD_AUDIO before the MediaProjectionpermission; if the user denies the request or closes the permissions screen, VRC_PERMISSION_ERROR is returned and recording does not start.

Last updated