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

Video Call - Videocall

This component requires a minimum iOS version of iOS13

Introduction

The Video Call is managed with the VideoCall Component.

This component is responsible for managing communication between a user and an agent (video assistance). Its main processes are:

  • Internal management of cameras, microphone, and permissions.

  • Connection with the services.

In the section of Simplified Launch the necessary steps for the basic integration of the SDK are detailed. In this section, information is added for the launch of this component.

Dependencies

To avoid conflicts and compatibility issues, if you want to install the component in a project that contains an old version of the Facephi libraries (Widgets), they must be completely removed before installing the components of the SDKMobile.

CocoaPods

  • The required dependencies that must have been installed previously (by adding them to the project's Podfile) are:

pod 'FPHISDKMainComponent', '~> $VERSION'
  • To install the Video Call component, the following entry must be included in the application's Podfile:

pod 'FPHISDKVideoCallComponent', '~> $VERSION'

SPM

  • The mandatory dependencies that must have been installed previously are:

  • To install the Video Call component, it must be included in the project's modules:

Available controllers

Controller

Description

VideoCallController

Main Video Call controller

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.

Launch:

extensionIdentifier must match the Bundle Identifier of the Broadcast Upload Extension for screen sharing that you add to your app (see Screen Sharing Extension).

Screen Sharing Extension

Starting with version 2.8.1, the Broadcast Upload Extension for screen sharing during the Video Call is configured in the integrating app and is associated with the component Video Call using extensionIdentifier.

Steps in the integrating app

  1. In Xcode, add a target Broadcast Upload Extension to the app project (e.g. File → New → Target → Broadcast Upload Extension).

  2. Define a Bundle Identifier unique for the extension (e.g. com.organization.app.videocallExtension).

  3. Use that identifier as extensionIdentifier when creating VideoCallController (see the launch example above).

  4. An entitlement of type App Group. When doing so, the same name must be entered in both the target and the extension.

  5. In the Info.plist of the extension, you must modify NSExtensionPrincipalClass so that its value is videocallComponent.VideoExtensionHandler.

  6. If installed through Cocoapods, the extension target must be added to the Podfile along with its dependency with VideoCall. If installed with SPM, the VideoCall dependency must be added to the extension target.

  7. Enable activateScreenSharing in VideoCallConfigurationData when you want to offer screen sharing in the call.

There is an code example with this functionality built in and configured.

In versions 2.8.0 and earlier, the broadcast extension could be associated with the Flow of Video Recording. Starting with 2.8.1 that responsibility passes to Video Call.

Basic configuration

The basic required configuration will not need any parameters.

Result reception

The controllers will return the necessary information in SdkResult format.

Error handling

For the error part, we will have the common class ErrorType.

  • VCL_CANCEL_BY_USER: The user has cancelled the process

  • VCL_CANCEL_LAUNCH: A general SDK cancellation has been performed

  • VCL_COMPONENT_LICENSE_ERROR: The component License is incorrect

  • VCL_EMPTY_LICENSE: The license String is empty

  • VCL_FACE_DETECTION_TIMEOUT: No face has been detected

  • VCL_INITIALIZATION_ERROR: Initialization error

  • VCL_MANAGER_NOT_INITIALIZED: The managers are null

  • VCL_NETWORK_CONNECTION: Internet connection error

  • VCL_NO_DATA_ERROR: The input data are null

  • VCL_OPERATION_NOT_CREATED: There is no operation in progress

  • VCL_PERMISSION_DENIED: The user has rejected the permissions

  • VCL_SOCKET_ERROR: Error in the services connection

  • VCL_TIMEOUT: Timeout in the process

  • VCL_VIDEO_ERROR: Error in video processing

  • VCL_UNKNOWN_ERROR: Unknown error

  • VCL_VIDEO_RECORDING_ACTIVE: It cannot be started because the video recording process is active

Successful execution receipt - data

On successful execution, it is simply reported that everything went well with SdkResult.Success.

When the result is Success and the flag sharingScreen screen sharing can be activated.

Advanced information

This section expands on the component information.

Advanced component configuration

The fields included in the configuration, normally do not need to be provided since they are completed internally through the License used.

activateScreenSharing

Enable the screen sharing option in the call.

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.

vibrationEnabled

If set to true, vibration is activated on errors and if the response from the Widget is OK

Component Customization

Besides the changes that can be made at SDK level (which are explained in the document of SDK Customization), this specific component allows its interface to be modified.

Texts

The texts can be customized by overriding the value of the following keys in a Localizable.strings. The keys containing the suffix _alt are the literals used in the accessibility labels needed for the functionality of voice over.

Name

Value

video_call_component_exit_alert_question

Are you sure you want to end the call?

video_call_component_exit_alert_finish

Finish

video_call_component_exit_alert_accept

Accept

video_call_component_exit_alert_cancel

Cancel

video_call_component_skip

SKIP

video_call_component_restart

RETRY

video_call_component_agent

Assistant

video_call_component_text_waiting_agent_title

Connecting with an assistant...

video_call_component_close_button_alt

Close

video_call_component_back_button_alt

Back

video_call_component_timeout_title

Timeout exceeded

video_call_component_timeout_desc

Could not connect with an agent.

In this way, if you want to modify, for example, the text “Finish” of the key video_call_component_exit_alert_finish for the language is, you will have to go to the file Localizable.strings in the folder es.lproj if it exists (if not, it must be created) and there, add:

"video_call_component_exit_alert_finish"="Terminar";

If a message is not specified in the language file, it will be filled with the default message.

Colors

The colors are initialized similarly in the colors variable with a dictionary, having as value any desired UIColor.

Animations

The animations to use are initialized similarly in the animations variable with a dictionary, having as value a string with the name of the animation found in xcassets that you want to use.

Last updated