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.
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.
Now, you have to enable video flags on each side of the call to send and receive video:
- videoflags of the Client.call method (WebSDK)
- videoflags of the VIClient.call:settings: (iOS SDK)
- videoflags of the IClient.call (Android SDK)
Note that for mobile SDKs you also have to do two things:
Now, let's learn how to process SDK calls (check the corresponding section for details).
All the methods that will be mentioned below are for Android SDK (their analogs for the other SDKs can be found in our documentation).
Since a call can behave in different ways, there is a group of call events you'll need:
- onCallAudioStarted – invoked after the audio is started in the call.;
- onCallConnected – invoked after a call was connected;
- onCallRinging – invoked when a call starts ringing.
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.
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.
*Check the React native endpoints section for details.