Help Center/ Meeting/ Client SDK Reference/ Electron SDK/ APIs/ Meeting Control Objects/ Subscribing to Role Change Notifications
Updated on 2024-07-30 GMT+08:00

Subscribing to Role Change Notifications

Function

A notification is sent when your role changed (valid only for the macOS platform).

Function Prototype

setOnSelfRoleChangedCB(onSelfRoleChanged: (role: ConfRole) => void): voidsetOnSelfRoleChangedCB(onSelfRoleChanged: (role: ConfRole) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
onSelfRoleChanged Yes (role: ConfRole) => void Notifies you when your role changed (valid only for the macOS platform).

Return Values

void

Notification Method Parameters

(role: ConfRole) => void

Table 2 Input parameter description
Parameter Type Description
role ConfRole Role in the meeting.
Table 3 Enumerated values of ConfRole
Enumeration Name Enumerated Value Description
HWM_CONF_ROLE_ATTENDEE 0 Common participant.
HWM_CONF_ROLE_HOST 1 Host.
HWM_CONF_ROLE_AUDIENCE 2 Attendee.
HWM_CONF_ROLE_COHOST 3 Co-host.
HWM_CONF_ROLE_WAITING 4 Waiting room member.