Skip to main content
The SDK does not include a built-in loading screen — you build your own using WebRTC lifecycle events. The example app demonstrates a complete loading screen pattern you can adapt.

Mapping events to progress

Each WebRTC lifecycle event represents a stage in the connection process. Map them to progress values:

Example implementation

Failure states

Show error messages when the connection fails:

Queue position during loading

When the user is in a queue, show their position:

Reconnection states

Update the loading screen during reconnection:

LOADING_CONFIG pattern (from example app)

The LOADING_CONFIG pattern is the recommended approach for loading screens. It centralizes all text, colors, and behavior in one object, making customization easy without modifying event handler logic.
The example app uses a configuration object to centralize all loading screen customization:
This pattern makes it easy to customize text, colors, and behavior without modifying the event handler logic.

Next steps

Mounting the stream

Append the SDK video to your DOM and hide default UI.

Example app walkthrough

See the complete reference implementation in React.