A Moderator can designate a connected Participant to act as a Moderator during the session. Doing so, the promoted Participant would get access to all the rights of the Moderator, i.e. accesses all features listed under Moderator Controls; and the old Moderator becomes a Participant. Similarly, the new Moderator can further grant Moderator Role to other participant if needed.

Method: static Future<void> switchUserRole(String clientId)

Parameter:

  • @param Sting clientId – Client ID of the participant who is being designated as Moderator

Event Listeners:

  • onSwitchedUserRole – Moderator is acknowledged that he has requested for Switch User Role
  • onUserRoleChanged – All participants are notified with a message that a new user has been appointed as moderator. Also, the newly appointed moderator is notified with extra information
EnxRtc.switchUserRole(‘clientId’); // To assign Moderator Role to clientId

EnxRtc.onSwitchedUserRole = (Map<dynamic,dynamic> map) {
	/ /Moderator is notified that request to role-switch is received 
};

EnxRtc.onUserRoleChanged = (Map<dynamic,dynamic> map) {
	// Everyone is notified about the new Moderator
};