onConnectOtherRoom property

(void Function(String userId, int errCode, String errMsg)?) onConnectOtherRoom
final

Result of Requesting Cross-Room Call

You can call the connectOtherRoom() API in TRTCCloud to establish a video call with the anchor of another room. This is the “anchor competition” feature.

The caller will receive the onConnectOtherRoom() callback, which can be used to determine whether the cross-room call is successful.

If it is successful, all users in either room will receive the onUserVideoAvailable() callback from the anchor of the other room.

  • Parameters:
    • errCode(int):
      • Error code. ERR_NULL indicates that cross-room connection is established successfully. For more information, please see Error Codes.
    • errMsg(String):
      • Error message.
    • userId(String):
      • The user ID of the anchor (in another room) to be called.

Implementation

final void Function(String userId, int errCode, String errMsg)? onConnectOtherRoom;