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

Methods: -(void)switchRoomMode:(NSString *_Nonnull)roomMode

Parameters:

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

Delegate Methods: :

  • -room:didAckSwitchedRoom – Acknowledgment to the Moderator with status of the request.
  • -room:didRoomModeSwitched – Notification to everyone in the Room that the switch has been switch to the other mode.
[enxRoom switchRoomMode:@” lecture”]; 	// To switch to group mode

// Moderator is acknowledged
- (void)room:(enxRoom *_Nullable)room didAckSwitchedRoom:(NSArray *_Nullable)data { 

	/* data example: 
	{
	  "result": 1715,
	  "moderator": "String",
	  "msg": "Room switched to lecture mode",
	  "mode": "lecture"
	}
	*/
}

// Everyone is notified
-(void)room:(enxRoom *_Nullable)room didRoomModeSwitched:(NSArray *_Nullable)data { 
	/* data example: 
	{
	  "result": 1715,
	  "moderator": "String",
	  "msg": "Room switched to lecture mode",
	  "mode": "lecture"
	}
	*/
}

Error Codes & Exceptions:

CodeDescription
5003Unauthorized Access. When a user with participant role invokes switchRoomMode()
5126Invalid Room Mode
5086Room is not connected
5136Non-Contextual Method Call
1716 Room is in lecture mode. Trying to switch to lecture mode being in lecture mode.
1717Room is in group mode. Trying to switch to group mode being in group mode.