The LiveKitRoom
component is the root of your LiveKit application. It sets the RoomContext
for its child components. You can nest both regular HTML and LiveKit components within it. If left empty, it renders the default VideoConference
component.
import * as React from 'react';import { LiveKitRoom } from '@livekit/components-react';const MyLiveKitApp = () => {const serverUrl = '';const accessToken = '';return (<LiveKitRoom serverUrl={serverUrl} token={accessToken} connect={true}>{/* Your components go here. */}</LiveKitRoom>);};