setClientRole abstract method
Sets the user role and level in an interactive live streaming channel. You can call this method either before or after joining the channel to set the user role as audience or host. If you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks: Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state. Triggers clientRoleChanged or on the local client. Triggers userJoined or userOffline (USER_OFFLINE_BECOME_AUDIENCE) on the remote client. This method only takes effect when the channel profile is live interactive streaming (when the profile parameter in setChannelProfile set as LiveBroadcasting).
Param role
The user role in the interactive live streaming.
Param options
The detailed options of a user, including the user level. See ClientRoleOptions for details.
Implementation
Future<void> setClientRole(ClientRole role, [ClientRoleOptions? options]);