clientRoleChanged property Null safety

ClientRoleCallback? clientRoleChanged
read / write

Occurs when the user role switches in a live broadcast. For example, from a host to an audience or from an audience to a host.

The SDK triggers this callback when the local user switches the user role by calling the RtcEngine.setClientRole method after joining the channel.

The ClientRoleCallback typedef includes the following parameters:

  • ClientRole oldRole: Role that the user switches from.
  • ClientRole newRole: Role that the user switches to.

Implementation

ClientRoleCallback? clientRoleChanged;