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

Inherits <NSObject>.

Properties

CGSize dimensions
 
NSInteger frameRate
 
NSInteger bitrate
 
BOOL captureMouseCursor
 
BOOL windowFocus
 
NSArray *_Nullable excludeWindowList
 
BOOL highLighted
 
COLOR_CLASS *_Nullable highLightColor
 
NSUInteger highLightWidth
 

Detailed Description

The definition of the screen sharing encoding parameters.

Property Documentation

◆ dimensions

- (CGSize) dimensions
readwritenonatomicassign

The dimensions of the shared region in terms of width × height. The default value is 0, which means the original dimensions of the shared screen.

◆ frameRate

- (NSInteger) frameRate
readwritenonatomicassign

The frame rate (fps) of the shared region. The default value is 5. We do not recommend setting this to a value greater than 15.

◆ bitrate

- (NSInteger) bitrate
readwritenonatomicassign

The bitrate (Kbps) of the shared region. The default value is 0, which means the SDK works out a bitrate according to the dimensions of the current screen.

◆ captureMouseCursor

- (BOOL) captureMouseCursor
readwritenonatomicassign

Sets whether to capture the mouse for screen sharing.

  • YES: (Default) Capture the mouse.
  • NO: Do not capture the mouse.

◆ windowFocus

- (BOOL) windowFocus
readwritenonatomicassign

Whether to bring the window to the front when calling [startScreenCaptureByWindowId]([AgoraRtcEngineKit startScreenCaptureByWindowId:rectangle:parameters:]) to share the window:

  • YES: Bring the window to the front.
  • NO: (Default) Do not bring the window to the front.
Note
Due to system limitations, windowFocus only supports bringing the main window of an application to the front.

◆ excludeWindowList

- (NSArray* _Nullable) excludeWindowList
readwritenonatomiccopy

A list of IDs of windows to be blocked.

When calling [startScreenCaptureByDisplayId]([AgoraRtcEngineKit startScreenCaptureByDisplayId:rectangle:parameters:]) and pass 0 in the displayId parameter to start sharing a main screen, you can use this parameter to block the specified windows. When calling [updateScreenCaptureParameters]([AgoraRtcEngineKit updateScreenCaptureParameters:]) to update the configuration for the main screen sharing, you can use this parameter to dynamically block the specified windows during the main screen sharing.

◆ highLighted

- (BOOL) highLighted
readwritenonatomicassign

(macOS only) Determines whether to place a border around the shared window or screen:

  • YES: Place a border.
  • NO: (Default) Do not place a border.
Note
When you share a part of a window or screen, the SDK places a border around the entire window or screen if you set highLighted as YES.

◆ highLightColor

- (COLOR_CLASS* _Nullable) highLightColor
readwritenonatomicstrong

(macOS only) The color of the border in RGBA format. The default value is 0xFF8CBF26.

on macOS, COLOR_CLASS refers to NSColor.

◆ highLightWidth

- (NSUInteger) highLightWidth
readwritenonatomicassign

(macOS only) The width (px) of the border. Defaults to 0, and the value range is [0,50].