GitHub

Source

useRemoteParticipant

The useRemoteParticipant hook returns the first RemoteParticipant by either identity or based on the participant kind.

Import

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

Remarks

To optimize performance, you can use the updateOnlyOn property to decide on what ParticipantEvents the hook updates.

Usage

const participant = useRemoteParticipant("Russ");

Properties

identitystringRequired
options.updateOnlyOnParticipantEvent[]Optional

To optimize performance, you can use the updateOnlyOn property to decide on what ParticipantEvents the hook updates. By default it updates on all relevant ParticipantEvents to keep the returned participant up to date.

Returns

RemoteParticipant | undefined;