GitHub

Source

Pictographic representation of the component.

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 of the LiveKitRoom component and should not be nested within it. Because it only accesses 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.

persistUserChoices?boolean

(Optional) If true, user choices are persisted across sessions.

userLabel?string

(Optional)

videoProcessor?TrackProcessor<Track.Kind.Video>

(Optional)