Agora RTC Objective-C API Reference  Refactor
Data Fields
VideoCanvas Struct Reference

Data Fields

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
 

Detailed Description

Attributes of video canvas object.

Constructor & Destructor Documentation

◆ VideoCanvas() [1/3]

VideoCanvas ( )
inline

◆ VideoCanvas() [2/3]

◆ VideoCanvas() [3/3]

Field Documentation

◆ view

view_t view

Video display window.

◆ uid

uid_t uid

The user id of local video.

◆ renderMode

The video render mode. See RENDER_MODE_TYPE. The default value is RENDER_MODE_HIDDEN.

◆ mirrorMode

The video mirror mode. See VIDEO_MIRROR_MODE_TYPE. The default value is VIDEO_MIRROR_MODE_AUTO.

Note
  • 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.

◆ setupMode

The mode of setting up video view. See VIDEO_VIEW_SETUP_MODE The default value is VIDEO_VIEW_SETUP_REPLACE.

◆ sourceType

VIDEO_SOURCE_TYPE sourceType

The video source type. See VIDEO_SOURCE_TYPE. The default value is VIDEO_SOURCE_CAMERA_PRIMARY.

◆ mediaPlayerId

int mediaPlayerId

The media player id of AgoraMediaPlayer. It should set this parameter when the sourceType is VIDEO_SOURCE_MEDIA_PLAYER to show the video that AgoraMediaPlayer is playing. You can get this value by calling the method getMediaPlayerId().

◆ cropArea

Rectangle cropArea

If you want to display a certain part of a video frame, you can set this value to crop the video frame to show. The default value is empty(that is, if it has zero width or height), which means no cropping.