onExitRoom property

(void Function(int reason)?) onExitRoom
final

Room Exit

Calling the exitRoom() API in TRTCCloud will trigger the execution of room exit-related logic, such as releasing resources of audio/video devices and codecs.

After all resources occupied by the SDK are released, the SDK will return the onExitRoom() callback.

If you need to call enterRoom() again or switch to another audio/video SDK, please wait until you receive the onExitRoom() callback. Otherwise, you may encounter problems such as the camera or mic being occupied.

  • Parameters:
    • reason(int):
      • Reason for room exit.
        • 0: the user called exitRoom to exit the room;
        • 1: the user was removed from the room by the server;
        • 2: the room was dismissed.

Implementation

final void Function(int reason)? onExitRoom;