setupRemoteVideoEx abstract method

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

Initializes the video view of a remote user.

This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. The application specifies the uid of the remote video in the VideoCanvas method before the remote user joins the channel. If the remote uid is unknown to the application, set it after the application receives the onUserJoined callback. If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the onUserJoined callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. In Flutter, you don't need to call this method. Use AgoraVideoView instead to render local and remote views. Call this method after joinChannelEx. To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderModeEx method.

  • canvas The remote video view settings. See VideoCanvas.
  • connection The 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. < 0: Failure.

Implementation

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