Session groups
Learn about sessions and session groups.
阅读时间1 分钟最后更新于 18 天前
Session groups are a collection of connected channel sessions that a user has joined. The sessions are put into a group to optimize both local and network resources related to those sessions, making it easier to manage relationships between the sessions.
Think of sessions and session groups like phones, not rooms:
- A session is like a phone handset: it's local to your client and lets you speak and listen in a channel, but it isn't the channel itself, and each participant has their own separate handset dialed into the same conversation.
- A session group is like a multi-line phone: it lets you manage several sessions at once, joining, muting, or switching which one you're transmitting into, from a single point of control, instead of juggling a separate handset for every channel.
Sessions are local container objects that are unique to your client application. How other participants have set up their own sessions has no bearing on yours; everyone's managing their own phone(s) independently.
A session group enforces a common codec for all participants. This means that all audio transmitted to or from participants in each session in the session group, and any other sessions in the same remote session group as those remote sessions, will share a single negotiated audio codec. The negotiated codec will default to the highest quality codec shared among all clients.
Join multiple channels
You can use session groups to join and manage multiple sessions simultaneously. One example of a user wanting to join multiple channels is in an MMO with different parties, guilds, clans, or other in-game groups. Another example is using a proximity-based channel (3D channel) to talk to others located near you in a virtual world, while also using a non-proximity group channel (2D channel) to keep a specific group of players connected regardless of in-world position.
Transmission modes
Manage user audio across sessions with transmission modes. Transmission modes allow you to determine which channels a user's microphone audio is broadcast into. The following options are available through different requests:
- Transmit user's voice to all sessions within a group: .
vx_req_sessiongroup_set_tx_all_sessions - Transmit the user's voice to a specified session in a group: .
vx_req_sessiongroup_set_tx_session - Disable voice transmission to all sessions within a group: .
vx_req_sessiongroup_set_tx_no_session