VideoCanvas
Attributes of the video canvas object.
export class VideoCanvas { view?: any uid?: number; subviewUid?: number; backgroundColor?: number; renderMode?: RenderModeType mirrorMode?: VideoMirrorModeType setupMode?: VideoViewSetupMode; sourceType?: VideoSourceType mediaPlayerId?: number; cropArea?: Rectangle; enableAlphaMask?: boolean; position?: VideoModulePosition; }
Attributes
- uid
- User ID that publishes the video source.
- subviewUid
- The ID of the user who publishes a specific sub-video stream within the mixed video stream.
- view
- The video display window. Attention: In one VideoCanvas, you can only choose to set either view or surfaceTexture. If both are set, only the settings in view take effect.
- renderMode
- The rendering mode of the video. See RenderModeType.
- mirrorMode
-
The mirror mode of the view. See VideoMirrorModeType.
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.
- sourceType
- The type of the video source. See VideoSourceType.
- setupMode
- Setting mode of the view. See VideoViewSetupMode.
- mediaPlayerId
- The ID of the media player. You can get the Device ID by calling getMediaPlayerId.
- cropArea
- (Optional) Display area of 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.
- backgroundColor
- The background color of the video canvas in RGBA format. The default value is 0x00000000, which represents completely transparent black.
- position
- The observation position of the video frame in the video link. See VideoModulePosition.