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
identifier
ParticipantIdentifier
options?
UseRemoteParticipantOptions
Returns
RemoteParticipant | undefined;