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.string
Optional room password
leave()
Leaves the conference and cleans up resources.Promise<void>
Promise that resolves when leave is complete
Participant Management
myUserId()
Returns the ID of the local participant.string
Local participant ID
getParticipants()
Returns all remote participants in the conference.Array<JitsiParticipant>
Array of remote participant objects
getParticipantById()
Returns a specific participant by ID.string
required
Participant ID to find
JitsiParticipant | undefined
The participant object, or undefined if not found
getParticipantCount()
Returns the number of participants (excluding the local user).number
Number of remote participants
kickParticipant()
Kicks a participant from the conference (moderator only).string
required
ID of participant to kick
string
Optional reason for kicking
grantOwner()
Grants owner/moderator role to a participant (moderator only).string
required
ID of participant to grant ownership
Track Management
addTrack()
Adds a local track to the conference.JitsiLocalTrack
required
Local track to add
Promise<void>
Promise that resolves when track is added
removeTrack()
Removes a local track from the conference.JitsiLocalTrack
required
Local track to remove
Promise<void>
Promise that resolves when track is removed
replaceTrack()
Replaces one local track with another (e.g., switching cameras).JitsiLocalTrack | null
required
Track to replace, or
null to add a new trackJitsiLocalTrack | null
required
New track, or
null to remove the old trackPromise<void>
Promise that resolves when replacement is complete
getLocalTracks()
Returns local tracks added to the conference.'audio' | 'video'
Optional media type filter
Array<JitsiLocalTrack>
Array of local tracks
getLocalAudioTrack()
Gets the local audio track.JitsiLocalTrack | undefined
Local audio track, if present
getLocalVideoTrack()
Gets the local video track.JitsiLocalTrack | undefined
Local video track, if present
Quality & Bandwidth Control
setReceiverConstraints()
Sets constraints for receiving video streams (resolution, framerate).object
required
setLastN()
Sets the number of video streams to receive.number
required
Number of videos to receive (use -1 for unlimited, 0 to receive none)
getLastN()
Gets the current lastN value.number
Current lastN value
setSenderVideoConstraint()
Sets the maximum resolution to send.number
required
Maximum video height to send (e.g., 180, 360, 720, 1080, 2160)
Promise<void>
Promise that resolves when constraints are applied
Muting & Moderation
muteParticipant()
Mutes a participant (moderator only).string
required
Participant ID to mute
'audio' | 'video'
required
Media type to mute
isMutedByFocus()
Checks if the local participant is muted by the moderator.'audio' | 'video'
required
Media type to check
boolean
true if muted by moderatorisAudioMuted()
Checks if local audio is muted.boolean
true if local audio is mutedisVideoMuted()
Checks if local video is muted.boolean
true if local video is mutedProperties & Settings
setDisplayName()
Sets the display name of the local participant.string
required
Display name to set
setSubject()
Sets the conference subject/title (moderator only).string
required
Conference subject
getSubject()
Gets the current conference subject.string
Current conference subject
setLocalParticipantProperty()
Sets a custom property on the local participant.string
required
Property name
any
required
Property value
sendApplicationLog()
Sends application log messages through the conference.string
required
Log message to send
Messaging
sendTextMessage()
Sends a text message to all participants.string
required
Message text
sendPrivateTextMessage()
Sends a private message to a specific participant.string
required
Participant ID
string
required
Message text
sendMessage()
Sends a custom message through the data channel or XMPP.any
required
Message to send (will be JSON stringified)
string
Optional recipient ID (broadcasts if omitted)
boolean
default:"false"
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)