useParticipant
Deprecated

useParticipant(params): Object | null

useParticipant returns a participant object for a given participant session_id. If no participant is found for the given session_id, returns null.

useParticipant can also be used to set up optional callbacks for participant-left and participant-updated events.

Params

ParameterRequiredTypeDescription
session_idstringA unique identifier for the participant
onParticipantLeftFunctionCallback for the participant-left event
onParticipantUpdatedFunctionCallback for the participant-updated event

Return type

TypeDescription
Object | nullContains detailed information about the participant, see participant properties. If no participant is found for a given session_id, useParticipant returns null

Sample code

Related references