clientRoleChanged property

ClientRoleCallback? clientRoleChanged
getter/setter pair

Occurs when the user role switches in a ChannelProfile.LiveBroadcasting channel. For example, from broadcaster to audience or vice versa.

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

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;