GitHub

Source

useLocalParticipant

The useLocalParticipant hook returns the local participant and the associated state around the participant.

Import

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

Usage

const { localParticipant } = useLocalParticipant();

Properties

options?UseLocalParticipantOptions

Returns

{
isMicrophoneEnabled: boolean;
isScreenShareEnabled: boolean;
isCameraEnabled: boolean;
microphoneTrack: TrackPublication | undefined;
cameraTrack: TrackPublication | undefined;
lastMicrophoneError: Error | undefined;
lastCameraError: Error | undefined;
localParticipant: LocalParticipant;
}