JitsiConference class represents a video conference session and provides methods for managing participants, tracks, and conference state.
Overview
JitsiConference handles:
- Conference room lifecycle (join, leave)
- Participant management
- Media track management (local and remote)
- Conference properties and state
- P2P and JVB connection modes
- Recording, transcription, and advanced features
Creating a Conference
Conferences are created through aJitsiConnection:
Configuration Options
FromJitsiConference.ts:84-151:
Room names must be lowercase. The JitsiConference constructor validates this and throws an error for invalid names.
Conference Lifecycle
Joining a Conference
CONFERENCE_JOINED event is fired:
Leaving a Conference
CONFERENCE_LEFT event is fired when leaving:
Conference Events
All conference events are defined inJitsiConferenceEvents.ts. Here are the most important ones:
Core Lifecycle Events
Participant Events
From
JitsiConferenceEvents.ts:445-457:
Track Events
From
JitsiConferenceEvents.ts:403-428:
Connection Events
From
JitsiConferenceEvents.ts:134-151:
Advanced Events
Participant Management
Getting Participants
JitsiConference.ts:292-367, the participants are stored in a Map:
Kicking Participants
Moderators can kick participants:Muting Participants
Moderators can mute participants:Track Management
Adding Local Tracks
TRACK_ADDED event fires for each added track.
Removing Local Tracks
TRACK_REMOVED event fires when a track is removed.
Replacing Tracks
Getting Tracks
Conference Properties
FromJitsiConference.ts:158-164:
P2P and JVB Modes
The conference can operate in two modes: Peer-to-Peer (P2P):- Direct connection between two participants
- Lower latency, better quality for 1-on-1 calls
- Automatically enabled when configured and only 2 participants present
- Multi-party conferencing through the bridge
- Used for 3+ participants
- Supports advanced features like simulcast
JitsiConference.ts:461-467:
Quality Control
LastN
Control how many video streams to receive:Receiver Video Constraints
Set constraints for received video:Room Management
Locking the Room
Subject
Set or get the room subject:Advanced Features
Recording
Transcription
E2EE (End-to-End Encryption)
FromJitsiConference.ts:488-492:
Best Practices
Handle All Lifecycle Events
Handle All Lifecycle Events
Always handle conference lifecycle events:
Manage Track Lifecycle
Manage Track Lifecycle
Properly manage track addition and removal:
Handle Remote Tracks
Handle Remote Tracks
Listen for remote track events:
Related Concepts
JitsiParticipant
Learn about participant properties and management
Media Tracks
Explore local and remote track handling
JitsiConnection
Understand XMPP connections