A Room defined with either group or lecture mode, may be switched to the other mode at runtime, i.e. in an ongoing session. EnxRoom.switchRoomMode() method is executed by moderator to switch to other mode instantly.

When a room is switched from group to lecture mode:

  • All participant’s audio/video streams are dropped from the room with a notification to each participants.
  • All the features of Lecture mode such as Floor Access Control are activated.
  • All active Break-Out Rooms get terminated.

On the other hand, when a room is switched from lecture to group mode:

  • A notification is sent to each participant and allows them to publish own audio/video streams into the room.
  • Due to privacy concern, SDK doesn’t automatically starts publishing audio/video stream in such case, but Developers needs to take decision whether to publish automatically or to prompt participants to publish.

Class: EnxRoom

Method: EnxRoom.switchRoomMode(roomMode, callback)

Parameter:

  • roomMode - String. Enumerated values lecture, group. Use the mode to switch into.

Event Notification:

  • room-mode-switched – Notification to everyone in the Room when the Room’s mode of operation is switched to the desired mode.
// To switch to group mode
room.room.switchRoomMode("group", function (resp) {
	if (resp.result == 0) {	
		// Success
	}
});
 
// Notification to all
room.addEventListener("room-mode-switched", function (evt) {
	// evt is JSON, e.g.
	/*
	{
		"type": "room-mode-switched",
		"message": {
			"mode": "group" 
		}
	}
	*/
});