When a call or live broadcast ends, use the Agora SDK to leave the channel.

Implementation

When a call or live broadcast ends, call the leaveChannel method to leave the channel.

The leaveChannel method releases all resources related to the call or live broadcast. When the user leaves the channel, the SDK triggers the onleaveChannel callback.

int nRet = m_lpAgoraEngine->leaveChannel();

If the leaveChannel method is called immediately after the release method, the process will be interrupted, and the SDK will not trigger the onleaveChannel callback.

Next Steps

You have integrated basic communication or live broadcast into your application. For advanced functions, see the sections under Advanced Guide.

If you encounter any problem integrating or using the Agora SDK, refer to the following sections or submit a ticket at Agora Dashboard.