Join a channel
Follow this workflow to join a Vivox channel and enable voice or text communication.
Read time 1 minuteLast updated 14 days ago
To join a channel, use the IChannelSession::BeginConnect() method on an IChannelSession that you create by using a game-selected identifier for the channel and a channel type.
Joining a channel requires an access token.For more information, refer to the Access Token Developer Guide.
When joining a channel, the game can choose whether to join with audio capability, which enables the player to participate in group audio, and whether to join text capability, which enables the player to participate in group text. This is set with the and arguments to , respectively. You can add or drop these capabilities without having to leave or rejoin the channel by calling IChannelSession::BeginSetAudioConnected() or IChannelSession::BeginSetTextConnected().
You can also set the argument to to automatically switch audio transmission into only the new channel when connected. This overrides and changes the TransmissionMode that is set in ILoginSession. You can manage channel transmission at any time by using ILoginSession::SetTransmissionMode().
Note
A user can join a maximum of 10 non-positional channels at a time. Attempts to join a channel beyond that limit fail with a VxXmppServerErrorServiceUnavailable (20502)
error.
Note
Channels have a maximum occupancy of 200 participants. Attempts to join a channel that has reached 200 participants will fail with a VxXmppServerErrorServiceUnavailable (20502)
error.