Setting up screen sharing with LiveKit
Unblu comes with built-in screen sharing functionality. This functionality uses peer-to-peer (P2P) communication to share the screen of a participant with the other conversation participants.
If there are multiple participants in the conversation, the bandwidth and CPU usage required to maintain multiple P2P connections for screen sharing can be significant. In some cases, this can result in a poor user experience.
Instead of using Unblu’s P2P-based screen sharing, you can use LiveKit. LiveKit acts as a media server between the conversation participants. This reduces both the bandwidth consumption and CPU usage in multiparty screen sharing conversations.
This article describes how to configure Unblu to use LiveKit for screen sharing.
Prerequisites
-
Before you configure Unblu, you must already have set up and deployed LiveKit.
-
You can’t use different service providers for screen sharing on the one hand and audio and video calls on the other. If you want to use LiveKit for screen sharing and also use Unblu’s audio and video call feature, you must use LiveKit for the latter, too. You can, however, use any call service provider with Unblu’s P2P screen sharing.
Configuration
To use LiveKit for screen sharing, you must set the following configuration properties in the ACCOUNT
scope:
-
Set com.unblu.conversation.call.callServiceProvider to
LIVEKIT
. You need to set this configuration property even if you don’t use Unblu for audio and video calls. -
Set com.unblu.conversation.call.screenSharingServiceProvider to
AUTO
. This tells Unblu to use the call service provider defined in the previous configuration property for screen sharing as well.If the call service provider doesn’t support screen sharing, Unblu defaults to the built-in P2P screen sharing.
The following configuration properties are shared with Unblu’s audio and video call feature. They configure Unblu to use LiveKit.
-
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
true
to 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.
See also
-
For more information on using LiveKit with Unblu and on configuring LiveKit as a call service provider, refer to the article Setting up audio and video calls with LiveKit.
-
For information on configuring the screen sharing layer once it’s up and running, refer to Configuring the screen sharing collaboration layer.