useRemoteParticipant
The useRemoteParticipant hook returns the first RemoteParticipant by either identity and/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({ kind: ParticipantKind.Agent, identity: "myAgent" });
Properties
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;