# wx.joinVoIPChat(Object object)

Start from base library version 2.7.0. Please remaining backward compatible.

User authorization is required for scope.record before this API is called.

Joins/Creates a real-time voice chat. For more information, see Real-time Voice Chat.

# Parameters

# Object object

Attribute Type Default Required Description
signature String Yes The signature to verify the Mini Game's identity
nonceStr String Yes A random string for verification
timeStamp Number Yes A timestamp for verification
groupId String Yes The ID of the room/group chat in a Mini Game. Users who simultaneously enter the same groupId are assigned to the same real-time chat room.
muteConfig Object No Sets whether to enable mute.
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

object.muteConfig is composed as follows

Attribute Type Default Required Description
muteMicrophone Boolean false No Specifies whether to mute the microphone.
muteEarphone Boolean false No Specifies whether to mute the headset.

# object.success callback function

# Parameters
# Object res
Property Type Description
openIdList Array.<String> The list of openIds of members in the chat
errCode Number Error code
errMsg String Call results

# Errors

Error Code Error Message Description
-1 The member is already in the room.
-2 The recording device is in use. This may be because the player is making a voice call in WeChat or is making a phone call.
-3 Failed to join the chat. This may be because the user exits the chat, switches the Mini Program to the background, or answers the phone while joining the chat.
-1000 System error