setupRemoteVideo abstract method

Future<void> setupRemoteVideo(
  1. VideoCanvas canvas
)

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 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. 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. In mobile custom composite layout scenarios, you can call this method to set a separate view for each sub-video stream of the composite video stream for rendering. 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 setRemoteRenderMode method. When using the recording service, since it does not send video streams, the app does not need to bind a view for it. If the app cannot identify the recording service, bind the remote user view upon receiving the onFirstRemoteVideoDecoded callback.

  • canvas Display properties of the remote video. See VideoCanvas.

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> setupRemoteVideo(VideoCanvas canvas);