switch To
Switches the local participant from the current meeting to a different meeting room using a specific authentication token.
This overload allows you to provide a different token for the destination room (e.g., if the target room requires separate authentication). When called, the SDK performs the following sequence:
- All remote participants' consumers (incoming streams) are closed.
- onParticipantLeft is fired for each remote participant in the current room.
- The local participant joins the destination room using the provided token.
- onMeetingJoined is fired for the new room.
Code Example:
meeting.switchTo("new-meeting-id", otherToken)
Parameters
the meeting ID of the room to switch to
(Optional) The authentication token for the target room, or null to use the current token.
See also
Throws
if meetingId is null or empty
Switches the local participant from the current meeting to a different meeting room without requiring a full leave/rejoin cycle.
This is a convenience overload that delegates to switchTo with the current authentication token. See that overload for full documentation on behavior and events.
Code Example:
meeting.switchTo("new-meeting-id")
Parameters
the meeting ID of the room to switch to
See also
Throws
if meetingId is null or empty