public class VideoCanvas
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
backgroundColor
A RGBA value indicates background color of the render view.
|
int |
mediaPlayerId
The media player id of AgoraMediaPlayer.
|
int |
mirrorMode
The video mirror mode:
- `VIDEO_MIRROR_MODE_AUTO(0)`: (Default) The mirror mode determined by the SDK.
|
Rect |
rect
If you want to display a certain part of a video frame, you can set
this value to crop the video frame to show.
|
static int |
RENDER_MODE_ADAPTIVE
3: This mode is deprecated and Agora does not recommend using it.
|
static int |
RENDER_MODE_FIT
2: Uniformly scale the video until one of its dimension
fits the boundary (zoomed to fit).
|
static int |
RENDER_MODE_HIDDEN
1: Uniformly scale the video until it fills the visible boundaries (cropped).
|
int |
renderMode
The video render mode:
- `RENDER_MODE_HIDDEN(1)`: (Default)Uniformly scale the video until it fills the visible
boundaries (cropped).
|
int |
rotation
The clockwise rotation information.
|
int |
setupMode
The mode of setting up video view.
|
int |
sourceType
The video source type.
|
SurfaceTexture |
surfaceTexture
Set
surfaceTexture makes Agora SDK as a video content provider, like Camera. |
int |
uid
The user id of local video.
|
View |
view
Video display window.
|
static int |
VIEW_SETUP_MODE_ADD |
static int |
VIEW_SETUP_MODE_REMOVE |
static int |
VIEW_SETUP_MODE_REPLACE |
| Constructor and Description |
|---|
VideoCanvas(View view) |
VideoCanvas(View view,
int renderMode) |
VideoCanvas(View view,
int renderMode,
int uid) |
VideoCanvas(View view,
int renderMode,
int mirrorMode,
int uid) |
public static final int RENDER_MODE_HIDDEN
public static final int RENDER_MODE_FIT
public static final int RENDER_MODE_ADAPTIVE
public static final int VIEW_SETUP_MODE_REPLACE
public static final int VIEW_SETUP_MODE_ADD
public static final int VIEW_SETUP_MODE_REMOVE
public View view
public SurfaceTexture surfaceTexture
surfaceTexture makes Agora SDK as a video content provider, like Camera.
While set view Agora SDK consumes video content using view.
You need draw texture on OpenGL context youself.
You may set view or surfaceTexture, BUT DO NOT BOTH in one VideoCanvas, otherwise result is
UNDEFINED.public int uid
public int renderMode
public int rotation
public int mirrorMode
public int setupMode
public int sourceType
public int mediaPlayerId
public Rect rect
public int backgroundColor