JitsiParticipant class represents a participant (member) in a conference, containing information about their identity, role, tracks, and custom properties.
Overview
JitsiParticipant provides:
- Participant identity and metadata
- Role management (moderator, participant)
- Track management (audio/video tracks)
- Custom properties for extensibility
- Feature capabilities
- Source information for tracks
Participant Structure
FromJitsiParticipant.ts:18-50:
Constructor
FromJitsiParticipant.ts:69-110:
The participant ID (
_id) is extracted from the resource part of the JID using Strophe.getResourceFromJid(). This is an 8-character hexadecimal string used as the endpoint ID.Getting Participants
Participants are managed through the conference:Participant Identity
Basic Information
JitsiParticipant.ts:182-253:
XMPP Identity
The identity object contains JWT context claims:JitsiParticipant.ts:207-210:
Connection Information
Participant Role
Participants can be moderators or regular participants:JitsiParticipant.ts:227-231 and JitsiParticipant.ts:309-312:
Participant Tracks
Getting Tracks
FromJitsiParticipant.ts:256-270:
Mute State
Check if participant is muted:JitsiParticipant.ts:121-126 and JitsiParticipant.ts:284-287:
Track Sources
Participants can have multiple sources (tracks) of the same media type: FromJitsiParticipant.ts:10-13 and JitsiParticipant.ts:98-109:
Source information is updated through the signaling layer when participants add, remove, or modify their tracks. The
PARTICIPANT_SOURCE_UPDATED event fires when sources change.Custom Properties
Participants can have custom properties for application-specific data:JitsiParticipant.ts:221-224 and JitsiParticipant.ts:398-410:
region- Participant’s geographic regioncodecList- Supported codec listfeatures- Supported feature set- Application-specific custom properties
Features
Participants advertise supported features:JitsiParticipant.ts:188-193 and JitsiParticipant.ts:273-280:
Participant States
Hidden Participants
Some participants may be hidden (e.g., recording bots):JitsiParticipant.ts:290-305:
Silent Status
Participants who joined without audio:Replacement Status
For participant replacement scenarios:JitsiParticipant.ts:314-328:
Participant Events
Participant-related events are fired on the conference:Practical Examples
Display Participant List
Show Participant Tracks
Monitor Moderator Status
Track Custom Properties
Best Practices
Cache Participant References Carefully
Cache Participant References Carefully
Participants may leave and rejoin. Always get fresh references:
Handle Participant Events
Handle Participant Events
Always handle participant lifecycle events:
Use Properties for Custom Data
Use Properties for Custom Data
Leverage custom properties for application state:
Related Concepts
JitsiConference
Learn about conference participant management
Media Tracks
Understand participant track management