setupRemoteVideoEx abstract method

Future<void> setupRemoteVideoEx({
  1. required VideoCanvas canvas,
  2. required RtcConnection connection,
})

Initializes the remote user view.

This method binds a remote user to a display view and sets the rendering and mirror mode of the remote user view displayed locally. It only affects the video seen by the local user. You need to specify the remote user's ID in VideoCanvas when calling this method. Typically, you can set this before joining the channel. If the remote user ID is not available before joining, call this method upon receiving the onUserJoined callback. If video recording is enabled, the recording service will join the channel as a dummy client, and other clients will also receive its onUserJoined event. The app should not bind a view for it (as it does not send video streams). To unbind a view from a remote user, call this method and set view to null. After leaving the channel, the SDK clears the binding of the remote user view. This method must be called after joinChannelEx. In Flutter, you do not need to call this method manually. Use AgoraVideoView to render local and remote views. If you want to update the rendering or mirror mode of the remote user view during a call, use the setRemoteRenderModeEx method.

  • canvas Video canvas information. See VideoCanvas.
  • connection Connection information. See RtcConnection.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions. < 0: Failure. See Error Codes for details and resolution suggestions.

Implementation

Future<void> setupRemoteVideoEx(
    {required VideoCanvas canvas, required RtcConnection connection});