The event_type
and payload
of the Real-Time Communication service:
event_type |
Description | Field name of payload |
---|---|---|
101 | Initializes the channel. | channelName , ts |
102 | Destroys the channel. | channelName , ts |
103 | In the Live Broadcast profile, the host joins the channel. | channelName , uid , platform , clientType , clientSeq , ts |
104 | In the Live Broadcast profile, the host leaves the channel. | channelName , uid , platform , clientType , clientSeq , reason , ts |
105 | In the Live Broadcast profile, an audience joins the channel. | channelName , uid , platform , clientType , clientSeq , ts |
106 | In the Live Broadcast profile, an audience leaves the channel. | channelName , uid , platform , clientType , clientSeq , reason , ts |
107 | In the Communication profile, a user joins the channel. | channelName , uid , platform , clientSeq , ts |
108 | In the Communication profile, a user leaves the channel. | channelName , uid , platform , reason , clientSeq , ts |
111 | In the Live Broadcast profile, a user switches the user role to the host after joining the channel. | channelName , uid , clientSeq , ts |
112 | In the Live Broadcast profile, a user switches the user role to the audience after joining the channel. | channelName , uid , clientSeq , ts |
For the description of each field name of payload
, see the following table:
Field name of payload |
Type | Description |
---|---|---|
channelName |
String | The channel name. |
ts |
Number | The Unix time (s) when the event occurs. |
uid |
Number | The user ID. |
platform |
Number | The platform type of your device: 1: Android 2: iOS 5: Windows 6: Linux 7: Web 8: macOS 0: Other platforms. |
clientType |
Number | The type of business used by the device running on Linux. Common return values include: 3:On-premise Recording 10:Cloud Recording This field is only returned when platform is 6 . |
clientSeq |
Number | The sequence number that identifies the order in which the event occurred on an app client. This field can be used to sort the events of the same user. |
reason |
Number | The reason why a user leaves the channel or goes offline:1 : The user has quit the call.2 : The SD-RTN timed out. For example, it has not received any data package within 10 seconds.3 : No permission to join the channel. For example, the SDK is banned from joining the channel by the RESTful API.4 : The connection between the SDK and Agora's server is lost. Once the connection is lost, the SDK tries to reconnect it.5 : The connection is changed. For example, the user uses a new device to join the channel, which forces the old device to leave the channel.9 : Because the user uses multiple IP addresses, the SDK actively disconnects from the Agora server and reconnects. The user is not aware of this process. Please check if the user has multiple public IP addresses or uses a VPN.10 : Due to network connection issues, for example, the SDK does not receive any data packets from the Agora server for more than 4 seconds or the socket connection error occurs, the SDK actively disconnects from the Agora server and reconnects. The user is not aware of this process. Please check the network connection status.999 : Invlid user. For example, a user who frequently logs in and out of a channel in a short period of time will be considered an invald user. Note: 60 seconds after receiving the 104 or 106 event with reason as 999 , your app server needs to call the Kick API to remove the user from the channel ; otherwise, when the user joins the channels again, your app server may not be notified of this user's events.0 : Other reasons. |