joinChannelWithUserAccount abstract method

Future<void> joinChannelWithUserAccount(
  1. String? token,
  2. String channelName,
  3. String userAccount, [
  4. ChannelMediaOptions? options,
])

Joins the channel with a user account, and configures whether to automatically subscribe to audio or video streams after joining the channel. This method allows a user to join the channel with the user account. After the user successfully joins the channel, the SDK triggers the following callbacks: The local client: localUserRegistered , joinChannelSuccess and connectionStateChanged callbacks. The remote client: The userJoined callback if the user is in the COMMUNICATION profile, and the userInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type.

Param options The channel media options.

Param token

Param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are (89 in total): The 26 lowercase English letters: a to z. The 26 uppercase English letters: A to Z. All numeric characters: 0 to 9. Space "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "", "", "^", "_", "{", "}", "|", "~", ","

Implementation

Future<void> joinChannelWithUserAccount(
    String? token, String channelName, String userAccount,
    [ChannelMediaOptions? options]);