Agora RTC Objective-C API Reference  Refactor
Properties
AgoraRtcVideoCanvas Class Reference

Inherits <NSObject>.

Properties

NSUInteger uid
 
NSUInteger subviewUid
 
VIEW_CLASS *_Nullable view
 
AgoraVideoRenderMode renderMode
 
AgoraVideoMirrorMode mirrorMode
 
AgoraVideoViewSetupMode setupMode
 
AgoraVideoSourceType sourceType
 
int mediaPlayerId
 
CGRect cropArea
 
UInt32 backgroundColor
 
BOOL enableAlphaMask
 
AgoraVideoModulePosition position
 

Detailed Description

Properties of the video canvas object.

Property Documentation

◆ uid

- (NSUInteger) uid
readwritenonatomicassign

The user id of local video.

◆ subviewUid

- (NSUInteger) subviewUid
readwritenonatomicassign

The uid of video stream composing the video stream from transcoder which will be drawn on this video canvas.

◆ view

- (VIEW_CLASS* _Nullable) view
readwritenonatomicstrong

The video display view. The SDK does not maintain the lifecycle of the view.

The view can be safely released after calling [leaveChannel]([AgoraRtcEngineKit leaveChannel:]) with a returned value. The SDK keeps a cache of the view value, so calling [setupLocalVideo]([AgoraRtcEngineKit setupLocalVideo:]) to set the view value to nil can clear the cache before switching or releasing the view.

◆ renderMode

- (AgoraVideoRenderMode) renderMode
readwritenonatomicassign

The video render mode. See AgoraVideoRenderMode. The default value is AgoraVideoRenderModeHidden.

◆ mirrorMode

- (AgoraVideoMirrorMode) mirrorMode
readwritenonatomicassign

The video mirror mode. See AgoraVideoMirrorMode. The default value is AgoraVideoMirrorModeAuto.

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

- (AgoraVideoViewSetupMode) setupMode
readwritenonatomicassign

The mode of setting up video view. See AgoraVideoViewSetupMode. The default value is AgoraVideoViewSetupReplace.

◆ sourceType

- (AgoraVideoSourceType) sourceType
readwritenonatomicassign

The video source type. See AgoraVideoSourceType The default value is AgoraVideoSourceTypeCamera.

◆ mediaPlayerId

- (int) mediaPlayerId
readwritenonatomicassign

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

◆ cropArea

- (CGRect) cropArea
readwritenonatomicassign

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.

◆ backgroundColor

- (UInt32) backgroundColor
readwritenonatomicassign

A RGBA value indicates background color of the render view. Defaults to 0x00000000.

◆ enableAlphaMask

- (BOOL) enableAlphaMask
readwritenonatomicassign

Whether to apply alpha mask to the video frame if exsit: YES: Apply alpha mask to video frame. NO: (Default) Do not apply alpha mask to video frame.

◆ position

- (AgoraVideoModulePosition) position
readwritenonatomicassign

The video frame position in pipeline. See AgoraVideoModulePosition. The default value is AgoraVideoModulePositionPostCapture.