setRemoteRenderModeEx

Sets the video display mode of a specified remote user.

public abstract int setRemoteRenderModeEx(
      int uid, int renderMode, int mirrorMode, RtcConnection connection);

Details

After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
Attention:
  • Call this method after initializing the remote view by calling the setupRemoteVideo method.
  • During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.

Parameters

uid
The user ID of the remote user.
renderMode
The video display mode of the remote user:
  • RENDER_MODE_HIDDEN(1): Hidden mode. Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
  • RENDER_MODE_FIT(2): Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio are filled with black.
  • RENDER_MODE_ADAPTIVE(3): This mode is deprecated.
mirrorMode
The mirror mode of the remote user view:
  • VIDEO_MIRROR_MODE_AUTO(0): The SDK determines whether to enable the mirror mode. 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.
  • VIDEO_MIRROR_MODE_ENABLED(1): Enable the mirroring mode of the local view.
  • VIDEO_MIRROR_MODE_DISABLED(2): Disable the mirroring mode of the local view.
connection
The connection information. See RtcConnection.

Returns

  • < 0: Failure.