The RTC SDK provides an interface method for channel member management. You can obtain the remote online user list, query remote user information, and query whether a user is online. By reading this article, you can learn how to manage channel members.
The following table describes common channel member management methods. For more information, see AliRtcEngine interface.
getOnlineRemoteUsers: Obtains the list of remote online users.
void getOnlineRemoteUsers(AliRtc::StringArray& array)
Parameter Type Description array AliRtc::StringArray& User list (user ID list).
getUserInfo: queries remote user information. If 0 is returned, it indicates that the acquisition is successful. If others are returned, it indicates that the acquisition fails.
int getUserInfo(const AliRtc::String& uid, AliRtc::Dictionary& dict)
Parameter Type Description uid const AliRtc::String& The ID of the user. dict AliRtc::Dictionary& Used to store user data. Valid values:
In dict, key values include userID, isOnline, sessionID, callID, displayName, hasAudio,hasCameraMaster, hasCameraSlave, hasScreenSharing, requestAudio,requestCameraMaster, requestCameraSlave, requestScreenSharing, preferCameraMaster subScribedAudio, subScribedCameraMaster,subScribedCamearSlave, subScribedScreenSharing, hasCameraView, hasScreenView, and muteAudioPlaying.
0 indicates that the method call was successful. Other indicates that the method call failed.
isUserOnline: queries whether a user is online.
bool isUserOnline(const AliRtc::String& uid)
Parameter Type Description uid const AliRtc::String& The ID of the user.
true indicates that the user is online. false indicates that the user is not online.