Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jitsi/jitsi-meet/llms.txt

Use this file to discover all available pages before exploring further.

Commands let you control a Jitsi meeting programmatically from the host page. Call api.executeCommand(commandName, ...arguments) to trigger any of the supported actions inside the embedded iframe. Commands are fire-and-forget — they send a postMessage to the iframe and return immediately.

Usage

// Single command with no arguments
api.executeCommand('toggleAudio');

// Command with arguments
api.executeCommand('setVideoQuality', 720);

// Execute multiple commands at once
api.executeCommands({
  displayName: 'Alice',
  subject: 'Weekly Sync'
});
Command names are camelCase strings. Passing an unrecognised command name logs a console error and has no effect. Call api.getSupportedCommands() to get a full list of available commands at runtime.

All Commands

toggleAudio — Toggle the local participant’s microphone mute state. No arguments.
api.executeCommand('toggleAudio');

toggleVideo — Toggle the local participant’s camera on or off. No arguments.
api.executeCommand('toggleVideo');

muteEveryone(mediaType) — Mute all participants in the conference. Requires moderator privileges.
ArgumentTypeDescription
mediaTypestring'audio' or 'video'
api.executeCommand('muteEveryone', 'audio');
api.executeCommand('muteEveryone', 'video');

setVideoQuality(height) — Set the maximum outgoing video resolution in pixels.
ArgumentTypeDescription
heightnumberTarget height, e.g. 180, 360, 480, 720, 1080
api.executeCommand('setVideoQuality', 720);

toggleShareScreen — Start or stop local screen sharing. No arguments.
api.executeCommand('toggleShareScreen');

setAudioOnly(enabled) — Force the meeting into audio-only mode.
api.executeCommand('setAudioOnly', true);

toggleNoiseSuppression — Toggle background noise suppression. No arguments.
api.executeCommand('toggleNoiseSuppression');

setNoiseSuppressionEnabled(enabled) — Explicitly enable or disable noise suppression.
api.executeCommand('setNoiseSuppressionEnabled', true);

toggleCamera — Switch between the front and back cameras on mobile devices. No arguments.
api.executeCommand('toggleCamera');

toggleCameraMirror — Mirror or un-mirror the local camera preview. No arguments.
api.executeCommand('toggleCameraMirror');

sendCameraFacingMode(mode) — Send a camera facing mode message to the conference.
api.executeCommand('sendCameraFacingMode', 'environment');

setBlurredBackground(enabled) — Enable or disable the blurred background effect.
api.executeCommand('setBlurredBackground', true);
hangup — Disconnect the local participant from the conference. No arguments.
api.executeCommand('hangup');

endConference — End the conference for all participants. Requires moderator privileges. No arguments.
api.executeCommand('endConference');

toggleLobby(enabled) — Enable or disable the lobby (waiting room) for the meeting.
ArgumentTypeDescription
enabledbooleantrue to enable the lobby, false to disable it
api.executeCommand('toggleLobby', true);

password(password) — Set or clear the room password. Pass an empty string to remove the password.
api.executeCommand('password', 'my-secret-pass');

subject(subject) — Set the meeting subject (title) displayed in the toolbar.
api.executeCommand('subject', 'Q3 Planning Session');

localSubject(subject) — Set the meeting subject locally (only visible to the local participant).
api.executeCommand('localSubject', 'My local title');

displayName(name) — Set the local participant’s display name.
api.executeCommand('displayName', 'Alice Smith');

email(email) — Set the local participant’s email address.
api.executeCommand('email', 'alice@example.com');

avatarUrl(url) — Set the local participant’s avatar image URL.
api.executeCommand('avatarUrl', 'https://example.com/avatar.png');

sendTones(options) — Send DTMF tones (useful for phone dial-in scenarios).
api.executeCommand('sendTones', { tones: '1234#', duration: 200, pause: 200 });

submitFeedback(score, message) — Programmatically submit post-call feedback.
api.executeCommand('submitFeedback', 4, 'Great call!');

setFollowMe(enabled) — Enable or disable Follow Me mode (moderator view control).
api.executeCommand('setFollowMe', true);

setMeetingTimer(seconds) — Set a countdown timer visible to all participants.
api.executeCommand('setMeetingTimer', 300); // 5 minutes

toggleModeration(enabled, mediaType) — Enable or disable AV moderation for the specified media type.
api.executeCommand('toggleModeration', true, 'audio');
startRecording(options) — Start a file recording or live stream. The mode field determines the recording type.
OptionTypeDescription
modestring'file' for server recording, 'stream' for live streaming
dropboxTokenstringOAuth2 token for Dropbox recording
shouldSharebooleanWhether to share the recording link with participants
rtmpStreamKeystringRTMP stream key for live streaming
rtmpBroadcastIDstringOptional RTMP broadcast ID
youtubeStreamKeystringYouTube stream key
youtubeBroadcastIDstringOptional YouTube broadcast ID
// Start server-side file recording
api.executeCommand('startRecording', { mode: 'file' });

// Stream to YouTube
api.executeCommand('startRecording', {
  mode: 'stream',
  youtubeStreamKey: 'xxxx-xxxx-xxxx-xxxx'
});

stopRecording(mode) — Stop an active recording or stream.
api.executeCommand('stopRecording', 'file');
api.executeCommand('stopRecording', 'stream');

grantRecordingConsent — Grant consent for recording on behalf of the local participant. No arguments.
api.executeCommand('grantRecordingConsent');

startShareVideo(url) — Share a video URL with all participants in the conference.
api.executeCommand('startShareVideo', 'https://example.com/video.mp4');

stopShareVideo — Stop the shared video. No arguments.
api.executeCommand('stopShareVideo');

setSubtitles(enabled, language?) — Enable or disable meeting subtitles/captions.
api.executeCommand('setSubtitles', true, 'en-US');

toggleSubtitles — Toggle meeting subtitles on or off. No arguments.
api.executeCommand('toggleSubtitles');
kickParticipant(participantId) — Remove a participant from the conference. Requires moderator privileges.
api.executeCommand('kickParticipant', 'participant-jid-here');

muteRemoteParticipant(participantId, mediaType) — Mute a specific participant.
api.executeCommand('muteRemoteParticipant', 'participant-jid-here', 'audio');

grantModerator(participantId) — Grant moderator role to a participant.
api.executeCommand('grantModerator', 'participant-jid-here');

rejectParticipant(participantId) — Reject a participant from joining. Requires moderator privileges.
api.executeCommand('rejectParticipant', 'participant-jid-here');

approveVideo(participantId) — Approve a participant’s video in a moderated session.
api.executeCommand('approveVideo', 'participant-jid-here');

toggleRaiseHand — Toggle the local participant’s raised-hand status. No arguments.
api.executeCommand('toggleRaiseHand');

overwriteNames(participants) — Override the display names of one or more participants. Accepts an array of { id, name } objects.
api.executeCommand('overwriteNames', [
  { id: 'participant-jid-1', name: 'External User 1' },
  { id: 'participant-jid-2', name: 'External User 2' }
]);

pinParticipant(participantId, videoType?) — Pin a participant to the large video stage.
api.executeCommand('pinParticipant', 'participant-jid-here', 'camera');

setParticipantVolume(participantId, volume) — Set the playback volume for a remote participant. Volume is a number from 0 (silent) to 1 (full).
api.executeCommand('setParticipantVolume', 'participant-jid-here', 0.5);

askToUnmute(participantId) — Send an unmute request to a participant.
api.executeCommand('askToUnmute', 'participant-jid-here');

answerKnockingParticipant(participantId, approved) — Admit or deny a participant waiting in the lobby.
// Admit the participant
api.executeCommand('answerKnockingParticipant', 'participant-jid', true);

// Deny the participant
api.executeCommand('answerKnockingParticipant', 'participant-jid', false);
addBreakoutRoom(name) — Create a new breakout room with the given name. Requires moderator privileges.
api.executeCommand('addBreakoutRoom', 'Team Alpha');

removeBreakoutRoom(roomJid) — Remove an existing breakout room by its JID.
api.executeCommand('removeBreakoutRoom', 'room-jid-here');

autoAssignToBreakoutRooms — Automatically distribute participants evenly across all breakout rooms. No arguments.
api.executeCommand('autoAssignToBreakoutRooms');

sendParticipantToRoom(participantId, roomId) — Move a specific participant into a breakout room.
api.executeCommand('sendParticipantToRoom', 'participant-jid', 'room-jid');

joinBreakoutRoom(roomId) — Move the local participant into a breakout room.
api.executeCommand('joinBreakoutRoom', 'room-jid-here');

closeBreakoutRoom(roomId) — Close a breakout room and return its participants to the main room.
api.executeCommand('closeBreakoutRoom', 'room-jid-here');
toggleChat — Show or hide the chat panel. No arguments.
api.executeCommand('toggleChat');

toggleTileView — Switch between tile (grid) view and stage view. No arguments.
api.executeCommand('toggleTileView');

setTileView(enabled) — Explicitly set tile view on or off.
api.executeCommand('setTileView', true);

toggleWhiteboard — Show or hide the collaborative whiteboard. No arguments.
api.executeCommand('toggleWhiteboard');

toggleFilmStrip — Show or hide the filmstrip (thumbnail strip). No arguments.
api.executeCommand('toggleFilmStrip');

resizeFilmStrip(width) — Resize the filmstrip to the specified width in pixels.
api.executeCommand('resizeFilmStrip', 200);

toggleParticipantsPane — Show or hide the participants list panel. No arguments.
api.executeCommand('toggleParticipantsPane');

showNotification(uid, type, subject, description) — Display a custom in-meeting notification banner.
api.executeCommand('showNotification', 'my-notif-1', 'info', 'Update available', 'Please refresh.');

hideNotification(uid) — Dismiss a notification by its unique ID.
api.executeCommand('hideNotification', 'my-notif-1');

setVirtualBackground(enabled, backgroundImage) — Enable a virtual background using a base64-encoded image.
api.executeCommand('setVirtualBackground', true, 'data:image/jpeg;base64,...');

toggleVirtualBackgroundDialog — Open or close the virtual background picker. No arguments.
api.executeCommand('toggleVirtualBackgroundDialog');

setLargeVideoParticipant(participantId, videoType?) — Force a specific participant onto the large video stage.
api.executeCommand('setLargeVideoParticipant', 'participant-jid', 'camera');

resizeLargeVideo(width, height) — Resize the large video container to the given pixel dimensions.
api.executeCommand('resizeLargeVideo', 1280, 720);

initiatePrivateChat(participantId) — Open a private chat window with the specified participant.
api.executeCommand('initiatePrivateChat', 'participant-jid-here');

cancelPrivateChat — Close the active private chat window. No arguments.
api.executeCommand('cancelPrivateChat');

showPiP — Show the Picture-in-Picture window. No arguments.
api.executeCommand('showPiP');

hidePiP — Hide the Picture-in-Picture window. No arguments.
api.executeCommand('hidePiP');

setSecondScreen(options) — Configure a second screen for the meeting.
api.executeCommand('setSecondScreen', { enable: true });
toggleE2EE(enabled) — Enable or disable End-to-End Encryption for the meeting.
api.executeCommand('toggleE2EE', true);

setMediaEncryptionKey(keyInfo) — Set a custom E2EE encryption key. The key object must contain the exported raw key bytes and an index.
// Using the high-level API wrapper (handles key export automatically)
await api.setMediaEncryptionKey({ key: cryptoKey, index: 0 });

// Using executeCommand directly with a pre-exported key
api.executeCommand('setMediaEncryptionKey', JSON.stringify({
  exportedKey: [/* byte array */],
  index: 0
}));
sendChatMessage(message, to?) — Send a message to the public chat, or a private message to a specific participant.
ArgumentTypeDescription
messagestringThe text content of the message
tostring (optional)Participant ID for a private message. Omit for public.
// Public message
api.executeCommand('sendChatMessage', 'Hello everyone!');

// Private message
api.executeCommand('sendChatMessage', 'Can you hear me?', 'participant-jid');

sendEndpointTextMessage(to, message) — Send a raw data channel message directly to a specific participant. Useful for custom application-layer signalling.
api.executeCommand('sendEndpointTextMessage', 'participant-jid', JSON.stringify({ action: 'ping' }));
setAssumedBandwidthBps(bps) — Override the bandwidth estimate used by the video quality manager. Useful when you know the user’s network conditions ahead of time.
// Assume 1 Mbps uplink
api.executeCommand('setAssumedBandwidthBps', 1_000_000);

overwriteConfig(config) — Overwrite config.js options after the meeting has started.
api.executeCommand('overwriteConfig', {
  startWithAudioMuted: true,
  disableDeepLinking: true
});

Practical Multi-Command Example

The following example demonstrates a real-world flow: joining a meeting, switching to tile view after the conference is joined, and then hanging up on a button click.
const api = new JitsiMeetExternalAPI('meet.jit.si', {
  roomName: 'TeamStandup',
  width: '100%',
  height: 600,
  parentNode: document.getElementById('meet-container'),
  configOverwrite: {
    startWithAudioMuted: true
  }
});

// Switch to tile view as soon as we join
api.addEventListener('videoConferenceJoined', () => {
  api.executeCommand('setTileView', true);
  api.executeCommand('subject', 'Daily Standup');
});

// Hang up when the user clicks the Leave button
document.getElementById('leave-btn').addEventListener('click', () => {
  api.executeCommand('hangup');
});

// Clean up after the conference ends
api.addEventListener('readyToClose', () => {
  api.dispose();
  document.getElementById('meet-container').innerHTML = '<p>Meeting ended.</p>';
});

Build docs developers (and LLMs) love