setClientRole method
Sets the role of a user.
This method sets the role of a user, such as a host or an audience. In a LiveBroadcasting channel, only a broadcaster can call the RtcChannel.publish method in the RtcChannel class.
A successful call of this method triggers the following callbacks:
- The local client: RtcChannelEventHandler.clientRoleChanged.
- The remote client: RtcChannelEventHandler.userJoined or RtcChannelEventHandler.userOffline (UserOfflineReason.BecomeAudience).
Parameter role
The role of the user. See ClientRole.
Implementation
@override
Future<void> setClientRole(ClientRole role) {
return _invokeMethod(
'setClientRole', {'role': ClientRoleConverter(role).value()});
}