GitHub

Source

useParticipantTile

The useParticipantTile hook is used to implement the ParticipantTile and returns the props needed to render the tile.

Import

import { useParticipantTile } from "@livekit/components-react";

Remarks

The returned props include many data attributes that are useful for CSS styling purposes because they indicate the state of the participant and the track. For example: data-lk-audio-muted, data-lk-video-muted, data-lk-speaking, data-lk-local-participant, data-lk-source, data-lk-facing-mode.

Properties

htmlPropsReact.HTMLAttributes<T>
disableSpeakingIndicator?boolean
onParticipantClick?(event: ParticipantClickEvent) => void
trackRef?TrackReferenceOrPlaceholder

The track reference to display.

Returns

{
elementProps: React.HTMLAttributes<T>;
}