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: Enx.switchUserRole(clientId)
Parameter: clientId
– Client ID of the participant who is being designated as Moderator
Callbacks:
acknowledgeSwitchUserRole
– Moderator is acknowledged that he has requested for Switch User RoleuserRoleChanged
– 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
Enx.switchUserRole(clientId); // Role Change Request from Moderator acknowledgeSwitchUserRole: event => { // Moderator is acknowledged } userRoleChanged: event => { // All Participants are notified - event jsonObject /* { "moderator": false, // You are not a moderator "clientId": "XXX" // New Moderator's Client ID } */ // New Moderator is notified - jsonObject /* { "moderator": true, // You are a moderator "clientId": "XXX", // New Moderator's Client ID i.e. You "raisedHands":[], // List of Client IDs requested Floor Access "approvedHands":[] // List of Client IDs with Floor Access } */ }