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

Video recording - Videorecording

Introduction

Screen video recording is done with the VideoRecording Component.

This component is responsible for capturing the device screen in the background. It is mainly intended for recording the onboarding process.


Dependency

The component's specific dependency is:

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

Available controllers

Controller

Description

VideoRecordingController

Main video recording controller.

StopVideoRecordingController

Controller to stop video recording.



Simplified Launch

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

Starting the capture

To start screen recording:

Stop the capture

To stop screen recording:

Error handling

Errors will be returned as a 'VideoRecordingError' object.

Error list:

  • VRC_CANCEL_BY_USER: The user has canceled the process

  • VRC_COMPONENT_LICENSE_ERROR: The component License is not correct

  • VRC_EMPTY_LICENSE: The License String is empty

  • VRC_INITIALIZATION_ERROR: Initialization error

  • VRC_OPERATION_NOT_CREATED: There is no operation in progress

  • VRC_NETWORK_CONNECTION: Internet connection error

  • VRC_PERMISSION_ERROR: The user has rejected the required permissions. With enableAudio=true it also covers the denial or dismissal of the microphone permission and the rejection of the permission of MediaProjection.

  • VRC_SOCKET_ERROR: Error in the services connection

  • VRC_UNKNOWN_ERROR: Unknown error

  • VRC_VIDEO_CALL_ACTIVE: It cannot be started because there is an active Video Call

  • VRC_VIDEO_ERROR: Error in video processing

  • VRC_VIDEO_RECORDING_ACTIVE: It cannot be started because the Video Recording process is active

  • VRC_FETCH_DATA_ERROR: Error in fetching the result

Reception of the successful result - data

If successful, the field data contains an object VideoRecordingResult.

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

Advanced information

This section expands on the component information.

Advanced component configuration

To launch the current component, an object VideoRecordingConfigurationData must be created, which will be the configuration of the component controller.

Below are all the fields that are part of this class.

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

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

url

Path to the video socket

apiKey

ApiKey required to connect to the video socket

tenantId

Identifier of the tenant that refers to the current client, required to connect to the video service.

enableAudio

Enables audio capture during screen recording. By default false. When reported as true, Android requests RECORD_AUDIO before the MediaProjection; if the user denies or closes the permissions screen, it returns VRC_PERMISSION_ERROR and recording does not start.

Last updated