Agora Java API Reference for Android
Public Member Functions | Protected Member Functions | List of all members
io.agora.rte.CanvasConfig Class Reference

This class provides methods for configuring video rendering of the player. More...

Public Member Functions

long getNativeHandle ()
 
void setVideoRenderMode (Constants.VideoRenderMode mode) throws RteException
 
Constants.VideoRenderMode getVideoRenderMode () throws RteException
 Gets the currently set mirror mode. More...
 
void setVideoMirrorMode (Constants.VideoMirrorMode mode) throws RteException
 Sets the video mirror mode. More...
 
Constants.VideoMirrorMode getVideoMirrorMode () throws RteException
 
void setCropArea (Rect rect) throws RteException
 
Rect getCropArea () throws RteException
 

Protected Member Functions

void finalize ()
 

Detailed Description

This class provides methods for configuring video rendering of the player.

Since
v4.4.0

Member Function Documentation

◆ setVideoRenderMode()

void io.agora.rte.CanvasConfig.setVideoRenderMode ( Constants.VideoRenderMode  mode) throws RteException

Set the video render mode.

Since
v4.4.0
Parameters
modeThe render mode to set. Refer to Constants.VideoRenderMode type, default is Constants.VideoRenderMode.HIDDEN.
Exceptions
RteExceptionRteException.errorCode() may return the following ErrorCode:
  • ErrorCode.INVALID_ARGUMENT: The mode parameter is set to an illegal value.
Returns
void

◆ getVideoRenderMode()

Constants.VideoRenderMode io.agora.rte.CanvasConfig.getVideoRenderMode ( ) throws RteException

Gets the currently set mirror mode.

Since
v4.4.0

Call timing: You need to call this method after getConfigs(CanvasConfig config).

Returns
The currently set mirror mode. See VideoMirrorMode for details.
Exceptions
RteExceptionIf the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception.

◆ setVideoMirrorMode()

void io.agora.rte.CanvasConfig.setVideoMirrorMode ( Constants.VideoMirrorMode  mode) throws RteException

Sets the video mirror mode.

Since
v4.4.0

Call timing: You must call this method before setConfigs(CanvasConfig config).

Parameters
modeThe mirror mode. See VideoMirrorMode for details. The default value is AUTO, which lets the SDK determine the mirror mode. By default, the mirror mode for remote users is disabled.
Exceptions
RteExceptionIf the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception.

◆ getVideoMirrorMode()

Constants.VideoMirrorMode io.agora.rte.CanvasConfig.getVideoMirrorMode ( ) throws RteException

Get the video mirror mode.

Since
v4.4.0
Returns
VideoMirrorMode