changeRole(userId: string, role: string)

Changes the role of an existing user. The target user's id and new role are provided as parameters.

//Promote a user to a moderator
sambaFrame.changeRole('9efc7798-a1a4-44bd-9d8d-532fe0feea9d', 'moderator');

//Demote later the moderator to attendee
sambaFrame.changeRole('9efc7798-a1a4-44bd-9d8d-532fe0feea9d', 'attendee');

Sample use case: Have a custom participants panel in your integration and want power users to be able to change roles of other participants.

This method is often used with the roleChanged event, which is emitted after a role of a user changes.

Last updated