Use this file to discover all available pages before exploring further.
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.
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:
const LOADING_CONFIG = { backgroundColor: '#18181A', accentColor: '#4e9cff', logoUrl: null, // Path to your logo image title: 'Connecting to Stream', subtitle: 'Please wait while we set up your experience...', disconnectedSubtitle: 'The stream session has ended.', showSpinner: true, // Queue message template queueMessage: (position) => `You are in queue at position ${position}`, // Status messages for each connection stage statusMessages: { initializing: 'Initializing...', connecting: 'Connecting to server...', webRtcConnecting: 'Establishing WebRTC connection...', sdpNegotiation: 'Negotiating stream parameters...', webRtcConnected: 'WebRTC connected, loading stream...', streamLoading: 'Stream is loading...', playingStream: 'Starting video playback...', inQueue: 'Waiting in queue...', failed: 'Connection failed. Please try again.', disconnected: 'Disconnected from stream.', reconnecting: 'Reconnecting to stream...', retrying: 'Retrying connection...', reconnected: 'Reconnected! Loading stream...', reconnectFailed: 'Unable to reconnect. Please refresh the page.', }, // Reconnection-specific titles reconnectingTitle: 'Reconnecting', reconnectingSubtitle: 'Please wait while we restore your session...', reconnectedTitle: 'Reconnected', reconnectFailedTitle: 'Reconnection Failed', reconnectFailedSubtitle: 'We were unable to restore your session.',};
This pattern makes it easy to customize text, colors, and behavior without modifying the event handler logic.