Agora Java API Reference for Android
Public Member Functions | List of all members
agora::streaming::IVideoPreviewRenderer Class Referenceabstract

#include <IAgoraStreamingKit.h>

Public Member Functions

virtual int setView (view_t view)=0
 
virtual int setRenderMode (RENDER_MODE_TYPE renderMode)=0
 
virtual int setMirrorMode (VIDEO_MIRROR_MODE_TYPE mirrorMode)=0
 
virtual void release ()=0
 

Detailed Description

The IVideoPreviewRenderer class.

Member Function Documentation

◆ setView()

virtual int agora::streaming::IVideoPreviewRenderer::setView ( view_t  view)
pure virtual

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.

◆ setRenderMode()

virtual int agora::streaming::IVideoPreviewRenderer::setRenderMode ( RENDER_MODE_TYPE  renderMode)
pure virtual

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 #RENDER_MODE_TYPE.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setMirrorMode()

virtual int agora::streaming::IVideoPreviewRenderer::setMirrorMode ( VIDEO_MIRROR_MODE_TYPE  mirrorMode)
pure virtual

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.

◆ release()

virtual void agora::streaming::IVideoPreviewRenderer::release ( )
pure virtual

Releases all IVideoPreviewRenderer resources.