Public Member Functions

 VideoCanvas (SurfaceView view)
 
 VideoCanvas (SurfaceView view, int renderMode, int uid)
 
 VideoCanvas (SurfaceView view, int renderMode, String channelId, int uid)
 
 VideoCanvas (SurfaceView view, int renderMode, int uid, int mirrorMode)
 
 VideoCanvas (SurfaceView view, int renderMode, String channelId, int uid, int mirrorMode)
 

Public Attributes

SurfaceView view
 
int renderMode
 
String channelId
 
int mirrorMode
 
int uid
 

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 RENDER_MODE_FILL = 4
 

Detailed Description

Properties of the video display window.

Member Data Documentation

◆ RENDER_MODE_HIDDEN

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

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

◆ RENDER_MODE_FIT

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

2: Uniformly scale the video until one of its dimension fits the boundary. Areas that are not filled due to the disparity in the aspect ratio are filled with black.

◆ RENDER_MODE_ADAPTIVE

final int io.agora.rtc.video.VideoCanvas.RENDER_MODE_ADAPTIVE = 3
static
Deprecated:
3: This mode is deprecated and Agora does not recommend using it.

◆ RENDER_MODE_FILL

final int io.agora.rtc.video.VideoCanvas.RENDER_MODE_FILL = 4
static

4: The fill mode. In this mode, the SDK stretches or zooms the video to fill the display window.

◆ view

SurfaceView io.agora.rtc.video.VideoCanvas.view

Video display window.

◆ renderMode

int io.agora.rtc.video.VideoCanvas.renderMode

The rendering mode of the video view:

  • RENDER_MODE_HIDDEN(1): Uniformly scale the video until it fills the visible boundaries. 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. 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.
  • RENDER_MODE_FILL(4): The fill mode. In this mode, the SDK stretches or zooms the video to fill the display window.

◆ channelId

String io.agora.rtc.video.VideoCanvas.channelId

The unique channel name for the AgoraRTC session in the string format. The string length must be less than 64 bytes. Supported character scopes are:

  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • All numeric characters: 0 to 9.
  • The space character.
  • Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
Note
  • The default value is the empty string "". Use the default value if the user joins the channel using the joinChannel method in the RtcEngine class. The VideoCanvas struct defines the video canvas of the user in the channel.
  • If the user joins the channel using the joinChannel method in the RtcChannel class, set this parameter as the channelId of the RtcChannel object. The VideoCanvas struct defines the video canvas of the user in the channel with the specified channel ID.

◆ mirrorMode

int io.agora.rtc.video.VideoCanvas.mirrorMode

The video mirror mode:

  • VIDEO_MIRROR_AUTO(0): The default mirror mode (the SDK determines the mirror mode).
  • VIDEO_MIRROR_MODE_ENABLED(1): Enable the mirror mode.
  • VIDEO_MIRROR_MODE_DISABLED(2): Disable the mirror mode.

◆ uid

int io.agora.rtc.video.VideoCanvas.uid

User ID.