Skip to main content
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.
const conference = connection.initJitsiConference('roomname', {
  openBridgeChannel: true,
  p2p: { enabled: true },
  startVideoMuted: 10
});

Conference Lifecycle

join()

Joins the conference.
conference.join(password);
password
string
Optional room password

leave()

Leaves the conference and cleans up resources.
await conference.leave();
result
Promise<void>
Promise that resolves when leave is complete

Participant Management

myUserId()

Returns the ID of the local participant.
const myId = conference.myUserId();
id
string
Local participant ID

getParticipants()

Returns all remote participants in the conference.
const participants = conference.getParticipants();
participants
Array<JitsiParticipant>
Array of remote participant objects

getParticipantById()

Returns a specific participant by ID.
const participant = conference.getParticipantById(participantId);
id
string
required
Participant ID to find
participant
JitsiParticipant | undefined
The participant object, or undefined if not found

getParticipantCount()

Returns the number of participants (excluding the local user).
const count = conference.getParticipantCount();
count
number
Number of remote participants

kickParticipant()

Kicks a participant from the conference (moderator only).
conference.kickParticipant(participantId, reason);
id
string
required
ID of participant to kick
reason
string
Optional reason for kicking

grantOwner()

Grants owner/moderator role to a participant (moderator only).
conference.grantOwner(participantId);
id
string
required
ID of participant to grant ownership

Track Management

addTrack()

Adds a local track to the conference.
await conference.addTrack(track);
track
JitsiLocalTrack
required
Local track to add
result
Promise<void>
Promise that resolves when track is added
Example:
const tracks = await JitsiMeetJS.createLocalTracks({
  devices: ['audio', 'video']
});

for (const track of tracks) {
  await conference.addTrack(track);
}

removeTrack()

Removes a local track from the conference.
await conference.removeTrack(track);
track
JitsiLocalTrack
required
Local track to remove
result
Promise<void>
Promise that resolves when track is removed

replaceTrack()

Replaces one local track with another (e.g., switching cameras).
await conference.replaceTrack(oldTrack, newTrack);
oldTrack
JitsiLocalTrack | null
required
Track to replace, or null to add a new track
newTrack
JitsiLocalTrack | null
required
New track, or null to remove the old track
result
Promise<void>
Promise that resolves when replacement is complete

getLocalTracks()

Returns local tracks added to the conference.
const tracks = conference.getLocalTracks(mediaType);
mediaType
'audio' | 'video'
Optional media type filter
tracks
Array<JitsiLocalTrack>
Array of local tracks

getLocalAudioTrack()

Gets the local audio track.
const audioTrack = conference.getLocalAudioTrack();
track
JitsiLocalTrack | undefined
Local audio track, if present

getLocalVideoTrack()

Gets the local video track.
const videoTrack = conference.getLocalVideoTrack();
track
JitsiLocalTrack | undefined
Local video track, if present

Quality & Bandwidth Control

setReceiverConstraints()

Sets constraints for receiving video streams (resolution, framerate).
conference.setReceiverConstraints({
  lastN: 5,
  selectedEndpoints: ['endpoint1', 'endpoint2'],
  defaultConstraints: { maxHeight: 720 },
  constraints: {
    'endpoint1': { maxHeight: 1080 }
  }
});
constraints
object
required

setLastN()

Sets the number of video streams to receive.
conference.setLastN(lastN);
lastN
number
required
Number of videos to receive (use -1 for unlimited, 0 to receive none)

getLastN()

Gets the current lastN value.
const lastN = conference.getLastN();
lastN
number
Current lastN value

setSenderVideoConstraint()

Sets the maximum resolution to send.
conference.setSenderVideoConstraint(maxHeight);
maxHeight
number
required
Maximum video height to send (e.g., 180, 360, 720, 1080, 2160)
result
Promise<void>
Promise that resolves when constraints are applied

Muting & Moderation

muteParticipant()

Mutes a participant (moderator only).
conference.muteParticipant(participantId, mediaType);
id
string
required
Participant ID to mute
mediaType
'audio' | 'video'
required
Media type to mute

isMutedByFocus()

Checks if the local participant is muted by the moderator.
const muted = conference.isMutedByFocus(mediaType);
mediaType
'audio' | 'video'
required
Media type to check
muted
boolean
true if muted by moderator

isAudioMuted()

Checks if local audio is muted.
const muted = conference.isAudioMuted();
muted
boolean
true if local audio is muted

isVideoMuted()

Checks if local video is muted.
const muted = conference.isVideoMuted();
muted
boolean
true if local video is muted

Properties & Settings

setDisplayName()

Sets the display name of the local participant.
conference.setDisplayName(displayName);
displayName
string
required
Display name to set

setSubject()

Sets the conference subject/title (moderator only).
conference.setSubject(subject);
subject
string
required
Conference subject

getSubject()

Gets the current conference subject.
const subject = conference.getSubject();
subject
string
Current conference subject

setLocalParticipantProperty()

Sets a custom property on the local participant.
conference.setLocalParticipantProperty(name, value);
name
string
required
Property name
value
any
required
Property value

sendApplicationLog()

Sends application log messages through the conference.
conference.sendApplicationLog(message);
message
string
required
Log message to send

Messaging

sendTextMessage()

Sends a text message to all participants.
conference.sendTextMessage(text);
text
string
required
Message text

sendPrivateTextMessage()

Sends a private message to a specific participant.
conference.sendPrivateTextMessage(id, text);
id
string
required
Participant ID
text
string
required
Message text

sendMessage()

Sends a custom message through the data channel or XMPP.
conference.sendMessage(message, to, sendThroughVideobridge);
message
any
required
Message to send (will be JSON stringified)
to
string
Optional recipient ID (broadcasts if omitted)
sendThroughVideobridge
boolean
default:"false"
Send through data channel instead of XMPP

Events

Subscribe to conference events using conference.on(event, handler):
conference.on(
  JitsiMeetJS.events.conference.CONFERENCE_JOINED,
  () => {
    console.log('Joined conference');
  }
);

conference.on(
  JitsiMeetJS.events.conference.USER_JOINED,
  (id, participant) => {
    console.log('Participant joined:', participant.getDisplayName());
  }
);

conference.on(
  JitsiMeetJS.events.conference.TRACK_ADDED,
  (track) => {
    if (track.isRemote()) {
      // Attach remote track to DOM
      track.attach(document.getElementById('video-container'));
    }
  }
);
Key Events:
  • CONFERENCE_JOINED - Successfully joined the conference
  • CONFERENCE_LEFT - Left the conference
  • CONFERENCE_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 interrupted
  • CONNECTION_RESTORED - Media connection restored
  • MESSAGE_RECEIVED - Text message received (id: string, text: string, ts: number)
  • PRIVATE_MESSAGE_RECEIVED - Private message received (id: string, text: string, ts: number)

Advanced Features

P2P Mode

Check P2P connection status:
const isP2P = conference.isP2PActive();
const isP2PEnabled = conference.isP2PEnabled();

End-to-End Encryption

Manage E2EE:
if (conference.isE2EESupported()) {
  await conference.toggleE2EE(true);
  const enabled = conference.isE2EEEnabled();
}

Recording

Start/stop recording:
// Start recording
conference.startRecording({
  mode: 'file', // or 'stream'
  appData: JSON.stringify({ customData: 'value' })
});

// Stop recording
conference.stopRecording(sessionID);

Transcription

Manage live transcription:
// Start transcription
conference.startTranscription();

// Stop transcription
conference.stopTranscription();

// Set transcription language
conference.setTranscriptionLanguage('en-US');

Build docs developers (and LLMs) love