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.
|
boolean |
enableAlphaMask
default false.
|
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.
|
Constants.VideoModulePosition |
position
The video frame position in pipeline.
|
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 |
setupMode
The mode of setting up video view.
|
int |
sourceType
The video source type.
|
int |
subviewUid
The user id of video stream composing the video stream from transcoder which will be drawn on
this video canvas.
|
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,
int uid) |
VideoCanvas(View view,
int renderMode,
int uid,
int subviewUid) |
public int uid
public int subviewUid
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 only view is
used.public int renderMode
public int mirrorMode
public int setupMode
public int sourceType
public int mediaPlayerId
public Rect rect
public boolean enableAlphaMask
public int backgroundColor
public Constants.VideoModulePosition position