CTRLK

Shared components

Configure WebRTC features

|

View as Markdown

SDK feature support [#supported-features-depending-on-platform-features]

The table below depicts the WebRTC SDK features available on different supported platforms.

FeatureJavaScript SDK (Desktop)JavaScript SDK (Android)JavaScript SDK (iOS)Android SDKiOS SDK
Call phone number
Call WebRTC endpoint
Call application (Calls API)
Join conference (Room)
Receive call
Reconnects

Receive call notification (wake up WebRTC app)

xxx

Audio and video input / output

Select devices prior to the callxx
Switch devices during the call

Audio control

Mute / unmute
Switch speaker / earphonesxxx
Choose audio quality
Background noise suppression✓ (Safari not supported)xxxx

Video control

Start / stop video feed
Switch front / back cameraxxx
Start / stop screen sharexx
Screen capturexx
Frame rate control
Background blur✓ (JS Extension)✓ (JS Extension)✓ (JS Extension)xx
Face tracking✓ (JS Extension)✓ (JS Extension)✓ (JS Extension)xx
Data channels
Network events

Network events [#network-events-features]

Inform your end users about network quality or networking issues during their WebRTC calls. Offer a better user experience using the network quality events feature.

If network problems occur during a call between two users, the platform will inform the user experiencing this issue that their network is too slow to support a high-quality call.

At the same time, the other user will be informed about their peer's network quality issues, so they are aware the problem lies on the other side of the call.

Depending on the platform where you'll incorporate this feature, see the Network quality section on the wiki of the Infobip RTC SDKs:

  • JavaScript SDK for browsers
  • iOS SDK
  • Android SDK

Recording WebRTC calls [#recordwebrtc-calls-features]

You can record video and audio calls with WebRTC. Recording is available as an add-on. To use this feature, contact your dedicated Account Manager.

Recordings for WebRTC are controlled by a combination of two elements:

  • Recording preferences set in the Infobip web interface using Channels and Numbers > Channels > Voice and WebRTC > Recordings > Settings
  • (Optional) Per call, recording setting applied via the SDK using CallOptions.RecordingOptions at the time of call creation (for more information, see the Wiki documentation)

Recording settings in the web interface

In the web interface, you can configure the default recording mode for WebRTC calls using the following settings:

  • NO_RECORDING – No recording is performed
  • AUDIO – Only audio is recorded
  • AUDIO_AND_VIDEO – Both audio and video are recorded

You can also enable recording composition, which generates a single mixed-media file for 1:1 or multi-party (Rooms) calls. The time it take to complete the composition may vary, depending on the system load.

SDK-level recording control

When initiating a call using the SDK, you can pass the CallOptions.RecordingOptions parameter to override the web interface setting. In this circumstance, the web interface must already allow recording.

The valid values for the CallOptions.RecordingOptions parameter are:

  • NO_RECORDING – Forces no recording, regardless of the web interface setting.
  • AUDIO – Records audio only.
  • AUDIO_AND_VIDEO – Records both audio and video.
  • UNDEFINED – Web interface setting is used.

If you do not provide an SDK value, the web interface setting is used by default.

Recording behavior matrix

The recording outcome behavior depends on both the web interface setting and the SDK CallOptions.RecordingOptions value.

The following table shows how the combination of your web interface recording setting and the SDK CallOptions.RecordingOptions value determines the recording outcome for a call.

For each possible pairing of the web interface setting and SDK call option, the table specifies whether the call will be recorded with audio, audio and video, or not recorded at all.

Web interface settingSDK callOptionOutcome for recording
NO_RECORDINGUNDEFINEDNO_RECORDING
NO_RECORDINGAUDIONO_RECORDING
NO_RECORDINGAUDIO_AND_VIDEONO_RECORDING
NO_RECORDINGNO_RECORDINGNO_RECORDING
AUDIOUNDEFINEDAUDIO
AUDIOAUDIOAUDIO
AUDIOAUDIO_AND_VIDEOAUDIO
AUDIONO_RECORDINGNO_RECORDING
AUDIO_AND_VIDEOUNDEFINEDAUDIO_AND_VIDEO
AUDIO_AND_VIDEOAUDIOAUDIO
AUDIO_AND_VIDEOAUDIO_AND_VIDEOAUDIO_AND_VIDEO
AUDIO_AND_VIDEONO_RECORDINGNO_RECORDING
Note

Web interface versus SDK priority

If the web interface setting is NO_RECORDING, recording is completely disabled, regardless of the SDK configuration.

The SDK CallOptions.RecordingOptions setting can reduce the recording level (for example, from AUDIO_AND_VIDEO to AUDIO), but it cannot override a web interface setting that prohibits recording.

Accessing recordings

After a recorded audio or video call has ended, the resulting files are available to you. You can search, download, and delete recordings through the API or web interface.

In the web interface, recordings can be filtered based on:

  • WebRTC call type (WebRTC, phone, Room, Viber)
  • Call type identifier (room name, WebRTC identity, phone number)
  • Date and time
Important

Application calls Recording of application-initiated calls over the Calls API are governed exclusively by the API, and they are not subject to the recording controls described in this section.

Note

Certain types of Voice and WebRTC calls and call recordings may be subject to specific country regulations. Before you set up and start using Voice and WebRTC, check the country's telecom regulations.

Screen capture [#screen-capture-features]

The JavaScript SDK allows to expose a screen capture facility to end users. Two modes of operation are available for WebRTC Screen Capture:

  • Client side: When a capture is triggered, the resulting image file is directly downloaded in the browser session to the end user's device.
  • Server side: When a capture is triggered, the resulting image file is uploaded to the Infobip servers. Listing and retrieving screen capture images is performed by API with the WebRTC file methods.

With the server-side screen capture, you can ensure that the end capture can trigger this function while ensuring privacy and security - in case for instance where your user or agent needs to capture ID cards, passports or credit cards while preventing this user from storing this files locally on his own workstation.

The capture is always performed on a single designated video stream.

Screen captured files that are stored on the Infobip servers are part of computing your recording storage charges.

Data channels [#data-channels-features]

The Infobip SDKs offer a powerful data channel feature that empowers developers to create custom data transfer solutions within their WebRTC-based applications. With this versatile tool, developers can design and implement a wide range of features such as chat, whiteboarding, or file transfer, tailored to their unique needs.

The data channel serves as the foundation for seamless real-time communication, enabling the exchange of arbitrary data between users. It's important to note that while our SDKs provide the fundamental building blocks for these functionalities, Infobip does not offer pre-packaged solutions for chat, whiteboarding, or file transfer out-of-the-box. Instead, Infobip provides developers with the tools and flexibility they need to craft their own tailored solutions, putting full creative control in their hands to create exceptional user experiences.

A chat showcase is implemented in the Infobip WebRTC demo application when performing ROOM calls.

WebRTC endpoint broadcast [#webrtc-endpoint-broadcast-features]

With the integration of the data channel in our WebRTC SDK, there are methods within the Calls API's conferences and dialogs to facilitate text broadcasts from a backend application to all WebRTC endpoints involved in a specific conference or dialog. This feature enables you to relay important information, alerts, or notifications to all participants in efficiently real-time.

In the WebRTC SDKs, a new event has been implemented to alert your WebRTC-based application about incoming broadcasts. This event provides comprehensive details about the broadcast content, allowing your application to handle or display this information seamlessly. This feature is only applicable when you are using WebRTC SDKs together with the Calls API platform.

Inter-region communications

By default, all communications between your WebRTC users, regardless of their location, will be routed through the Infobip data center or infrastructure region associated with your account. For example, if your account is linked to our European infrastructure region and you have two users based in the USA, their WebRTC traffic will be directed through our European data centers. If you anticipate having WebRTC users distributed across multiple regions (such as Europe, USA, Latin America, Asia, etc.) or need to facilitate communication between WebRTC users in different regions, Infobip can accommodate these scenarios. Contact the Infobip support team to request this specific configuration.

Technical requirements

Here are the technical details you need to know before you start using WebRTC.

Bandwidth requirements [#bandwidthrequirements-technical-requirements]

The approximate data rate for each stream of WebRTC:

Stream typeResolutionApproximate bandwidth
Audio onlyN/A50 Kbps
Low-resolution video240 × 180180 Kbps
SD video640 × 480600 Kbps
HD video1280 × 7201500+ Kbps

Codecs [#codecs-technical-requirements]

AudioVideo
OPUS, PCMVP8, H.264

Platform compatibility [#platform-compatibility-technical-requirements]

For supported Android versions, see the supported list.

For supported iOS versions, see iOS system requirements.

For supported browsers and OS, see browser compatibility list.

Was this page helpful?