Setting up audio and video calls with LiveKit
This article provides information on how to set up Unblu to use LiveKit to establish audio and video calls.
How LiveKit works in general is outlined in the LiveKit documentation.
If you are using Unblu Cloud, LiveKit is provided as a service out of the box and you don’t have to configure anything.
If you have an Unblu on-premises installation, you can still use LiveKit as an Unblu Cloud service. In this case, you must configure Unblu to use LiveKit as explained below, but Unblu provides you with the server, API keys, and secrets required for LiveKit.
If you choose to run LiveKit on-premises, you have to set up and deploy your own LiveKit server. For more information on how to do so, refer to the LiveKit documentation.
If you want to deploy LiveKit to a Kubernetes cluster, you must take into account the following statement from the LiveKit documentation:
LiveKit pods requires direct access to the network with host networking. This means that the rtc.udp/tcp ports that are open on those nodes are directly handled by LiveKit server. With that direct requirement of specific ports, it means we’ll be limited to one LiveKit pod per node. It’s possible to run other workload on those nodes.
Deploy to Kubernetes: Understanding the deployment
Additionally, each node running LiveKit must have its own public IP address.
One way to meet these requirements, at least in principle, without directly exposing other nodes in the cluster to the internet is to isolate LiveKit by deploying it to a dedicated Kubernetes cluster. However, you shouldn’t underestimate the obstacles you must overcome.
Running LiveKit on a VM in your DMZ may be easier to reconcile with the IT strategy of organizations that put a premium on security.
If you have any concerns about running LiveKit on-premises, you should consider using Unblu’s LiveKit cloud service instead. For more information, contact your Unblu account manager.
Once you’ve set up your LiveKit server, configure Unblu to use it. Set the following configuration properties at the
com.unblu.conversation.call.livekit.apiUrl: URL pointing to the LiveKit server used by the Unblu server for API calls.
com.unblu.conversation.call.livekit.apiKey: LiveKit API key used to identify Unblu with LiveKit.
com.unblu.conversation.call.livekit.apiSecret: LiveKit API secret used by the Unblu server to authenticate against the LiveKit server and create access tokens for the clients.
com.unblu.conversation.call.livekit.accessTokenTimeout: Timeout, in seconds, for call access tokens that are handed out by the Unblu server to the clients (browsers) so they can connect to a LiveKit call.
com.unblu.conversation.call.livekit.serverUrl: LiveKit signaling server URL used by the clients (browsers) to connect to the LiveKit server.
com.unblu.conversation.call.livekit.customTurnEnabled: Set to
trueto use a custom TURN server for LiveKit. That way, Unblu establishes audio and video calls using the TURN server or servers specified in the configuration property com.unblu.webrtc.iceServers. Otherwise, the LiveKit TURN server is used.
LiveKit isn’t compatible with all TURN servers.
If your Unblu deployment accesses external services through a forward proxy, and LiveKit is deployed as an external service, provide Unblu with URL of the proxy in the configuration property com.unblu.conversation.call.livekit.apiProxyUrl.
Select other options as required. See the Conversation call section of the configuration properties reference for an overview of the available options.
If a visitor navigates to a new page inside the Unblu-instrumented web page, the video connection is disrupted while the page loads and automatically re-establishes a connection as soon as possible. To work around this, visitors can use the pop-out feature.
The video chat can only be displayed in one browser window or tab. If the visitor has several tabs or windows open and they belong to the same Unblu conversation, the video chat stays in one window. If the user wants to transfer the video chat to a different window, they can do so in the chat user interface.
Currently, Unblu only supports up to six concurrent video chat participants.
Audio level indicators aren’t supported. A workaround is in place to indicate if a participant is speaking.
For more information about data encryption, refer to the article about call service providers.
If you want to record and archive audio and video calls, refer to conversation recording.
If you use LiveKit for calls, you may also want to use it for screen sharing. Refer to the article Setting up screen sharing with LiveKit for more information.