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

Inherits <NSObject>.

Properties

VIEW_CLASS *_Nullable view
 
NSUInteger uid
 
AgoraVideoRenderMode renderMode
 
AgoraVideoMirrorMode mirrorMode
 
AgoraVideoViewSetupMode setupMode
 
AgoraVideoSourceType sourceType
 
int mediaPlayerId
 
CGRect cropArea
 

Detailed Description

Properties of the video canvas object.

Property Documentation

◆ 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.

◆ uid

- (NSUInteger) uid
readwritenonatomicassign

The user id of local video.

◆ 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.