Agora Java API Reference for Android
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
io.agora.rtc2.video.VideoCanvas Class Reference

Public Member Functions

 VideoCanvas (View view)
 
 VideoCanvas (View view, int renderMode)
 
 VideoCanvas (View view, int renderMode, int uid)
 
 VideoCanvas (View view, int renderMode, int mirrorMode, int uid)
 
 VideoCanvas (View view, int renderMode, int mirrorMode, int sourceType, int uid)
 
 VideoCanvas (View view, int renderMode, int mirrorMode, int sourceType, int sourceId, int uid)
 
 VideoCanvas (View view, int renderMode, int mirrorMode, int sourceType, int sourceId, int uid, Rect rect, int setupMode)
 

Public Attributes

View view
 
int renderMode
 
int mirrorMode
 
int sourceType
 
int sourceId
 
int uid
 
int setupMode = VIEW_SETUP_MODE_REPLACE
 
Rect rect
 

Static Public Attributes

static final int RENDER_MODE_HIDDEN = 1
 
static final int RENDER_MODE_FIT = 2
 
static final int RENDER_MODE_ADAPTIVE = 3
 
static final int VIEW_SETUP_MODE_REPLACE = 0
 
static final int VIEW_SETUP_MODE_ADD = 1
 
static final int VIEW_SETUP_MODE_REMOVE = 2
 

Detailed Description

The VideoCanvas class.

Member Data Documentation

◆ RENDER_MODE_HIDDEN

final int io.agora.rtc2.video.VideoCanvas.RENDER_MODE_HIDDEN = 1
static

1: Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.

◆ RENDER_MODE_FIT

final int io.agora.rtc2.video.VideoCanvas.RENDER_MODE_FIT = 2
static

2: 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

final int io.agora.rtc2.video.VideoCanvas.RENDER_MODE_ADAPTIVE = 3
static

3: This mode is deprecated and Agora does not recommend using it.

◆ view

View io.agora.rtc2.video.VideoCanvas.view

Video display window. Must be SurfaceView or TextureView

◆ renderMode

int io.agora.rtc2.video.VideoCanvas.renderMode

The video render mode:

  • RENDER_MODE_HIDDEN(1): Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
  • RENDER_MODE_FIT(2): 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 and Agora does not recommend using it.

◆ mirrorMode

int io.agora.rtc2.video.VideoCanvas.mirrorMode

The video mirror mode:

  • VIDEO_MIRROR_MODE_AUTO(0): (Default) The mirror mode determined by the SDK. 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.

◆ sourceType

int io.agora.rtc2.video.VideoCanvas.sourceType

The video source type:

◆ sourceId

int io.agora.rtc2.video.VideoCanvas.sourceId

ID of the video source.

◆ uid

int io.agora.rtc2.video.VideoCanvas.uid

ID of the user in the integer format.

◆ setupMode

int io.agora.rtc2.video.VideoCanvas.setupMode = VIEW_SETUP_MODE_REPLACE

setupMode

◆ rect

Rect io.agora.rtc2.video.VideoCanvas.rect

Rect info