VideoCanvas
Attributes of video canvas object.
struct VideoCanvas { view_t view; uid_t uid; media::base::RENDER_MODE_TYPE renderMode; VIDEO_MIRROR_MODE_TYPE mirrorMode; VIDEO_VIEW_SETUP_MODE setupMode; VIDEO_SOURCE_TYPE sourceType; int mediaPlayerId; Rectangle cropArea; VideoCanvas() : view(NULL), uid(0), renderMode(media::base::RENDER_MODE_HIDDEN), mirrorMode(VIDEO_MIRROR_MODE_AUTO), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), cropArea(0, 0, 0, 0) {} VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u) : view(v), uid(u), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), cropArea(0, 0, 0, 0) {} VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, user_id_t) : view(v), uid(0), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), cropArea(0, 0, 0, 0) {} };
Attributes
- view
- Video display window.
- renderMode
-
The rendering mode of the video. See RENDER_MODE_TYPE.
- mirrorMode
-
The mirror mode of the view. See VIDEO_MIRROR_MODE_TYPE.
Attention:- For the mirror mode of the local video view: If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
- For the remote user: The mirror mode is disabled by default.
- uid
- The user ID.
- sourceType
- The type of the video frame, see VIDEO_SOURCE_TYPE.
- setupMode
- Setting mode of the view. See VIDEO_VIEW_SETUP_MODE.
- mediaPlayerId
- The ID of the media player. You can get the media player ID by calling getMediaPlayerId.
- cropArea
- (Android and iOS only) (Optional) The display area for the video frame. See Rectangle. width and height represent the video pixel width and height of the area. The default value is null (width or height is 0), which means that the actual resolution of the video frame is displayed.