setClientRole method

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

Sets the role of a user (ChannelProfile.LiveBroadcasting only).

This method sets the role of a user, such as a host or an audience (default), before joining a channel. This method can be used to switch the user role after a user joins a channel. In the ChannelProfile.LiveBroadcasting profile, when a user switches user roles after joining a channel, a successful setClientRole method call triggers the following callbacks:

Parameter role Sets the role of a user. See ClientRole.

Implementation

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