setLocalRenderMode abstract method

Future<void> setLocalRenderMode({
  1. required RenderModeType renderMode,
  2. VideoMirrorModeType mirrorMode = VideoMirrorModeType.videoMirrorModeAuto,
})

Updates the display mode of the local video view.

After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream. Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method. During a call, you can call this method as many times as necessary to update the display mode of the local video view. This method only takes effect on the primary camera (primaryCameraSource). In scenarios involving custom video capture or the use of alternative video sources, you need to use setupLocalVideo instead of this method.

  • renderMode The local video display mode. See RenderModeType.
  • mirrorMode The mirror mode of the local video view. See VideoMirrorModeType. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.

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.

Implementation

Future<void> setLocalRenderMode(
    {required RenderModeType renderMode,
    VideoMirrorModeType mirrorMode =
        VideoMirrorModeType.videoMirrorModeAuto});