onEnterRoom property
final
Whether Room Entry is Successful
After calling the enterRoom()
API in TRTCCloud
to enter a room,
you will receive the onEnterRoom(result)
callback from TRTCCloudDelegate
.
- If room entry succeeded,
result
will be a positive number (result > 0
), indicating the time in milliseconds (ms) the room entry takes. - If room entry failed,
result
will be a negative number (result < 0
), indicating the error code for the failure.
For more information on the error codes for room entry failure, see Error Codes.
- Parameters:
- result(int):
- If
result
is greater than 0, it indicates the time (in ms) the room entry takes; ifresult
is less than 0, it represents the error code for room entry.
- If
- result(int):
Note
- In TRTC versions below 6.6, the
onEnterRoom(result)
callback is returned only if room entry succeeds, and theonError()
callback is returned if room entry fails.- In TRTC 6.6 and above, the
onEnterRoom(result)
callback is returned regardless of whether room entry succeeds or fails, and theonError()
callback is also returned if room entry fails.
Implementation
final void Function(int result)? onEnterRoom;