Overview
Strengths
Features
Scenarios
Compliance
AppID and Key of the SDK as instructed in Activating Services.EnterRoom API, you need to call the SetAudioRole API to set the role of the current user in voice chat.public abstract int SetAudioRole(ITMG_AUDIO_MEMBER_ROLE role);
Parameter | Type | Description |
role | ITMG_AUDIO_MEMBER_ROLE | ITMG_AUDIO_MEMBER_ROLE_ANCHOR: Host, who can enable the mic and speaker in the room. ITMG_AUDIO_MEMBER_ROLE_AUDIENCE: Listener, who can enable only the speaker in the room to listen to others. |
ITMGContext.GetInstance().SetAudioRole(ITMG_AUDIO_MEMBER_ROLE.ITMG_AUDIO_MEMBER_ROLE_AUDIENCE);
EnterRoom API to enter a voice chat room.EnableMic and EnableSpeaker APIs to enable the mic and speaker respectively.EnableSpeaker API to enable the speaker, but the AV_ERR_INVALID_ARGUMENT error code (1004) will be returned to remind that you are in listener mode and the mic cannot be enabled when you call the EnableMic API.SetAudioRole to change the role.EnableMic API at the business layer to change the mic status and the mic UI status.ExitRoom API is called to exit the voice chat room, the role status becomes invalid, and the role needs to be set again.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback