Skip to main content
leave() Leaves the current meeting. If there is no active meeting, this method does nothing. After calling leave(), the call object remains available and can be reused — call join() again to start a new session without having to recreate the call object. Call destroy() when you are done with the call object entirely.

Return value

Returns a Promise<void> that resolves once the participant has left.

Example

document.getElementById('leave-btn').onclick = async () => {
  await call.leave();
  showLobbyUI();
};

call.on('left-meeting', () => {
  // Also fires when ejected or when a fatal error ends the call
  showLobbyUI();
});

See also