LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

PreJoin

The PreJoin prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera und microphone). On submit the user decisions are returned, which can then be passed on to the LiveKitRoom so that the user enters the room with the correct media devices.

Import

import { PreJoin } from '@livekit/components-react';

Remarks

This component is independent from the LiveKitRoom component and don't has to be nested inside it. Because it only access the local media tracks this component is self contained and works without connection to the LiveKit server.

Usage

<PreJoin />

Properties

#
camLabel?string

(Optional)

#
debug?boolean

(Optional) Display a debug window for your convenience.

#
defaults?Partial<LocalUserChoices>

(Optional) Prefill the input form with initial values.

#
joinLabel?string

(Optional)

#
micLabel?string

(Optional)

#
onError?(error: Error) => void

(Optional)

#
onSubmit?(values: LocalUserChoices) => void

(Optional) This function is called with the LocalUserChoices if validation is passed.

#
onValidate?(values: LocalUserChoices) => boolean

(Optional) Provide your custom validation function. Only if validation is successful the user choices are past to the onSubmit callback.

#
userLabel?string

(Optional)

On this page

ImportRemarksUsageProperties

Previous

Chevron IconParticipantTile
LiveKit logo

Product

SFU

SDKs

Performance

Deployment

GitHub Logo