文档

​
​

Development

User Acquisition

Monetization

工业

Vivox Core SDK

Vivox Core SDK

此页面不支持所选语言。
Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
    • Integration guide
    • Quick start guide
      • Initializing Vivox
      • Logging in
      • Assign a unique username
      • Generate a login access token
      • Submit a login request
      • Joining and leaving channels
      • Generate and submit a join token
      • Process join responses and events
      • Handle join errors
  • Release notes
  • Developer Guide
  • Reference
  • Privacy overview
  1. Vivox Core SDK documentation

Process join responses and events

Understand what events your game should to listen to during the joining process.
阅读时间2 分钟
最后更新于 8 个月前

When joining a channel there are two types of events your game should be configured to listen to. The first set of events will give you the status of the audio and text channels. The second set of events will provide information for UI events to manage a roster of “in-channel” users.

Audio and text event responses

Audio events:
void HandleMediaStreamUpdatedEvent(vx_evt_media_stream_updated *evt){ if (evt->state == session_media_connected) { printf("Audio Connected to %s\n", evt->session_handle);
Text events:
void HandleTextStreamUpdatedEvent(vx_evt_text_stream_updated *evt){ if (evt->state == session_text_connected) { printf("Text Connected to %s\n", evt->session_handle);
Use media to respond to audio events and use text to respond to text channel events. Craft responses to both if both text and audio are being used.

Participant updated events

Participant updated events allow you to manage a list of in-channel users for use in your game UI or elsewhere in your application.
void HandleParticipantAddedEvent(vx_evt_participant_added *evt){ //use this to update your roster/game that a player has joined a channel}void HandleParticipantRemovedEvent(vx_evt_participant_removed *evt){ //use this to update your roster/game that player has left a channel}void HandleParticipantUpdatedEvent(vx_evt_participant_updated *evt){ //this indicates when a player is speaking, not speaking, and other key player events}
When tracking participant state, it is important to use the
encoded_uri_with_tag
field as the unique identifier of the participant. This allows the game to distinguish between users who have left a channel and users who have rejoined a channel.
注意
Use the
is_current_user
field to distinguish between events that pertain to the local user from events that pertain to other users.
Next step, check for errors and verify your implementation.

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Audio and text event responses

    • Participant updated events


报告此页面的问题