setClientRole method

  1. @override
Future<void> setClientRole(
  1. ClientRole role
)

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:

Parameter role The role of the user. See ClientRole.

Implementation

@override
Future<void> setClientRole(ClientRole role) {
  return _invokeMethod(
      'setClientRole', {'role': ClientRoleConverter(role).value()});
}