onRemoteUserEnterRoom property

(void Function(String userId)?) onRemoteUserEnterRoom
final

A User Entered the Room

Due to performance concerns, this callback works differently in different scenarios (i.e., AppScene, which you can specify by setting the second parameter when calling enterRoom).

  • Live Streaming Scenarios (TRTCAppScene.live or TRTCAppScene.voiceChatRoom): In live streaming scenarios, a user is either in the role of an anchor or audience. The callback is returned only when an anchor enters the room.

  • Call Scenarios (TRTCAppScene.videoCall or TRTCAppScene.audioCall): In call scenarios, the concept of roles does not apply (all users can be considered as anchors), and the callback is returned when any user enters the room.

  • Parameters:

    • userId(String):
      • User ID of the remote user.

Note

  1. The onRemoteUserEnterRoom callback indicates that a user entered the room, but it does not necessarily mean that the user enabled audio or video.

  2. If you want to know whether a user enabled video, we recommend you use the onUserVideoAvailable callback.

Implementation

final void Function(String userId)? onRemoteUserEnterRoom;