Rate this page:

How to make a video call

Making video calls in Voximplant is quite easy. To do that, you have to set everything up for a Voximplant scenario and an SDK client. Please note that prices for audio-only and video calls are different! In case you already have a scenario for audio calls and want to enable video sending, read this article How to upgrade a call.

Voximplant scenario

First, you need to set the video parameter of the callUser method to true, so that the call has video support. And you also need the scheme parameter with the internal information about codecs from the AppEvents.CallAlerting event.

After that, the retrieved scheme should be passed to the Call.answer method to handle calls properly.

Video support for Voximplant scenario

Video support for Voximplant scenario

SDK side

Now, you have to enable video flags on each side of the call to send and receive video:

Note that for mobile SDKs you also have to do two things:

  1. Use the VICall.start/ ICall.start method after enabling the video flags.
  2. Before you enable video sending, request camera permission if it hasn't been received from the user yet.
IMPORTANT: Safari browser for iOS requires a user interface for playing video during a call.
Video support for SDK clients

Video support for SDK clients

Now, let's learn how to process SDK calls (check the corresponding section for details).

Please note

All the methods that will be mentioned below are for Android SDK (their analogs for the other SDKs can be found in our documentation).

Handling a call

Use the ICall.answer method to answer the call and the onIncomingCall event to handle an incoming call on the callee side.

Since a call can behave in different ways, there is a group of call events you'll need:

Displaying local/remote video

Turning the video on and off triggers the events of adding/ removing a local or remote video. So, calling the ICall.sendVideo method will entail adding or removing a local video on the side of the client which called this API and adding or removing video on the other client’s side:

*Check the React native video streams section for details.

Terminating a call

Using the ICall.hangup method allows you to terminate the call properly. Both participants will receive the ICallListener.onCallDisconnected event after hangup's call will be executed.

Endpoints

The IEndpoint interface represents any remote call party (Web/iOS/Android application, SIP or regular phone, etc.). Each Endpoint instance has built-in methods for managing video streams. Endpoints have their own events, e.g., to detect starting or terminating of receiving a video stream from a remote participant.

Note that the ICall instance has the ICall.getEndpoints method to retrieve all current endpoints for a call; it also has the ICallListener.EndpointAdded event on adding a new endpoint.

*Check the React native endpoints section for details.