The Agora RTC SDK does not provide any callback events that listen for an audience joining or leaving an interactive live streaming channel. However, you can listen for these events using either of the following two approaches:
The message notification service enables you to listen for various service events, which are sent to your Server in the form of HTTP/HTTPS requests.
event_type | event_name | Description | Field name of payload |
---|---|---|---|
105 | audience join channel |
In the LIVE_BROADCASTING profile, an audience joins the channel. |
|
106 | audience leave channel |
In the LIVE_BROADCASTING profile, an audience leaves the channel |
|
Refer to the following documents for more detailed steps and descriptions:
The Agora RTM SDK aims at providing stable signaling services, such as maintaining the channel information and sending real-time messages, for various social and education scenarios.
By integrating both the Agora RTC SDK and the Agora RTM SDK, you can listen for the callback events of the RTM SDK to detect the states of the audience in the RTC channel:
Refer to the following documents for detailed integration guide and API reference: