Skip to content

Creating InfobipRTC Client

Ajša Terko edited this page Feb 22, 2023 · 1 revision

The InfobipRTC client is an interface which allows you to connect to the Infobip platform, make calls to other users, receive calls and configure audio and video devices. It is the starting point of using the SDK. This is why we provide a global factory function which you can use to create an instance of the client. You can import it as follows:

import { createInfobipRtc } from "infobip-rtc"

This function takes the following arguments:

  • token: string - Authentication token generated by client's app via Infobip's HTTP /webrtc/1/token endpoint.
  • rtcOptions: any - Optional object containing options used to configure InfobipRTC. The following fields are supported:
    • debug: boolean - Influences the log level. false by default. false will result in the log level being set to ERROR, while true will set it to DEBUG.
    • statsUrl: string - The URL of Infobip WebRTC platform to connect to.

Finally, here is an example of how to use it:

let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});

Tutorials

Migration guides

Reference documentation

Clone this wiki locally