setupLocalVideo abstract method

Future<void> setupLocalVideo(
  1. VideoCanvas canvas
)

Initializes the local video view.

This method initializes the video view of a local stream on the local device. It only affects the video seen by the local user and does not impact the publishing of the local video. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. The binding remains valid after leaving the channel. To stop rendering or unbind the local video from the view, set view as NULL. In Flutter, you don't need to call this method. Use AgoraVideoView instead to render local and remote views. To update only the rendering or mirror mode of the local video view during a call, call setLocalRenderMode instead.

  • canvas The local video view and settings. 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. < 0: Failure.

Implementation

Future<void> setupLocalVideo(VideoCanvas canvas);