Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.streaming.VideoPreviewRenderer Interface Reference
Inheritance diagram for io.agora.streaming.VideoPreviewRenderer:
io.agora.streaming.internal.VideoPreviewRendererImpl

Public Member Functions

int setView (SurfaceView view)
 
int setRenderMode (@VideoRenderMode int renderMode)
 
int setMirrorMode (@VideoMirrorMode int mirrorMode)
 

Member Function Documentation

◆ setView()

int io.agora.streaming.VideoPreviewRenderer.setView ( SurfaceView  view)

Set the local video view.

This method sets the video display window for the local video stream. To unbind the local video from the view, set view as null.

Parameters
viewThe video display window.
Returns
  • 0: Success.
  • < 0: Failure.

Implemented in io.agora.streaming.internal.VideoPreviewRendererImpl.

◆ setRenderMode()

int io.agora.streaming.VideoPreviewRenderer.setRenderMode ( @VideoRenderMode int  renderMode)

Updates the display mode of the local video view.

After setting the local video view, you can call this method to update its rendering mode. If affects only the video view that the local user sees, not the published local video stream.

Parameters
renderModeSets the local display mode. See #RenderMode.
Returns
  • 0: Success.
  • < 0: Failure.

Implemented in io.agora.streaming.internal.VideoPreviewRendererImpl.

◆ setMirrorMode()

int io.agora.streaming.VideoPreviewRenderer.setMirrorMode ( @VideoMirrorMode int  mirrorMode)

Sets the video mirror mode.

Parameters
mirrorModeSets the video mirror mode:
  • VIDEO_MIRROR_MODE_AUTO(0): (Default) The mirror mode determined by the Kit. If you use the front camera, the SDK enables the mirror mode; if you use the rear camera, the SDK disables the mirror mode.
  • VIDEO_MIRROR_MODE_ENABLED(1): Enable the mirror mode.
  • VIDEO_MIRROR_MODE_DISABLED(2): Disable the mirror mode.
Returns
  • 0: Success.
  • < 0: Failure.