JitsiConference represents a multi-user video conference session. It manages participants, media tracks, and conference features like recording, transcription, and quality control.
Creation
Conferences are created through JitsiConnection.initJitsiConference() or the simplified JitsiMeetJS.joinConference() method.Conference Lifecycle
join()
Joins the conference.Optional room password
leave()
Leaves the conference and cleans up resources.Promise that resolves when leave is complete
Participant Management
myUserId()
Returns the ID of the local participant.Local participant ID
getParticipants()
Returns all remote participants in the conference.Array of remote participant objects
getParticipantById()
Returns a specific participant by ID.Participant ID to find
The participant object, or undefined if not found
getParticipantCount()
Returns the number of participants (excluding the local user).Number of remote participants
kickParticipant()
Kicks a participant from the conference (moderator only).ID of participant to kick
Optional reason for kicking
grantOwner()
Grants owner/moderator role to a participant (moderator only).ID of participant to grant ownership
Track Management
addTrack()
Adds a local track to the conference.Local track to add
Promise that resolves when track is added
removeTrack()
Removes a local track from the conference.Local track to remove
Promise that resolves when track is removed
replaceTrack()
Replaces one local track with another (e.g., switching cameras).Track to replace, or
null to add a new trackNew track, or
null to remove the old trackPromise that resolves when replacement is complete
getLocalTracks()
Returns local tracks added to the conference.Optional media type filter
Array of local tracks
getLocalAudioTrack()
Gets the local audio track.Local audio track, if present
getLocalVideoTrack()
Gets the local video track.Local video track, if present
Quality & Bandwidth Control
setReceiverConstraints()
Sets constraints for receiving video streams (resolution, framerate).setLastN()
Sets the number of video streams to receive.Number of videos to receive (use -1 for unlimited, 0 to receive none)
getLastN()
Gets the current lastN value.Current lastN value
setSenderVideoConstraint()
Sets the maximum resolution to send.Maximum video height to send (e.g., 180, 360, 720, 1080, 2160)
Promise that resolves when constraints are applied
Muting & Moderation
muteParticipant()
Mutes a participant (moderator only).Participant ID to mute
Media type to mute
isMutedByFocus()
Checks if the local participant is muted by the moderator.Media type to check
true if muted by moderatorisAudioMuted()
Checks if local audio is muted.true if local audio is mutedisVideoMuted()
Checks if local video is muted.true if local video is mutedProperties & Settings
setDisplayName()
Sets the display name of the local participant.Display name to set
setSubject()
Sets the conference subject/title (moderator only).Conference subject
getSubject()
Gets the current conference subject.Current conference subject
setLocalParticipantProperty()
Sets a custom property on the local participant.Property name
Property value
sendApplicationLog()
Sends application log messages through the conference.Log message to send
Messaging
sendTextMessage()
Sends a text message to all participants.Message text
sendPrivateTextMessage()
Sends a private message to a specific participant.Participant ID
Message text
sendMessage()
Sends a custom message through the data channel or XMPP.Message to send (will be JSON stringified)
Optional recipient ID (broadcasts if omitted)
Send through data channel instead of XMPP
Events
Subscribe to conference events usingconference.on(event, handler):
CONFERENCE_JOINED- Successfully joined the conferenceCONFERENCE_LEFT- Left the conferenceCONFERENCE_FAILED- Conference failed(errorCode: string, error: Error)USER_JOINED- Participant joined(id: string, participant: JitsiParticipant)USER_LEFT- Participant left(id: string, participant: JitsiParticipant)TRACK_ADDED- Track added(track: JitsiTrack)TRACK_REMOVED- Track removed(track: JitsiTrack)TRACK_MUTE_CHANGED- Track mute status changed(track: JitsiTrack)DISPLAY_NAME_CHANGED- Participant display name changed(id: string, name: string)DOMINANT_SPEAKER_CHANGED- Dominant speaker changed(id: string)CONNECTION_INTERRUPTED- Media connection interruptedCONNECTION_RESTORED- Media connection restoredMESSAGE_RECEIVED- Text message received(id: string, text: string, ts: number)PRIVATE_MESSAGE_RECEIVED- Private message received(id: string, text: string, ts: number)