exitRoom method

Future<void> exitRoom()

Exit room

When the exitRoom API is called, the logic related to room exit will be executed, such as releasing resources of audio/video devices and codecs. After resources are released, the SDK will use the TRTCCloudListener.onExitRoom callback to notify you.

If you need to call enterRoom again or switch to another audio/video SDK, please wait until you receive the TRTCCloudListener.onExitRoom callback; otherwise, exceptions such as occupied camera or mic may occur; for example, the common issue with switching between media volume and call volume on Android is caused by this problem.


Future<void> exitRoom() {
  return _cloudChannel!.invokeMethod('exitRoom');