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

## Property Documentation

## ◆ dimensions

- (CGSize) dimensions
| read write nonatomic assign

The video encoding resolution of the screen sharing stream. If the screen dimensions are different from the value of this parameter, Agora applies the following strategies for encoding. Suppose `dimensions` is set to 1920 × 1080:

- If the value of the screen dimensions is lower than that of `dimensions`, for example, 1000 × 1000 pixels, the SDK uses the screen dimensions, that is, 1000 × 1000 pixels, for encoding.
- If the value of the screen dimensions is higher than that of `dimensions`, for example, 2000 × 1500, the SDK uses the maximum value under `dimensions` with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 × 1080.
  Note
    When setting the encoding resolution in the scenario of sharing documents ( AgoraScreenScenarioDocument ), choose one of the following two methods:
- If you require the best image quality, it is recommended to set the encoding resolution to be the same as the capture resolution.
- If you wish to achieve a relative balance between image quality, bandwidth, and system performance, then:
  - When the capture resolution is greater than 1920 × 1080, it is recommended that the encoding resolution is not less than 1920 × 1080.
  - When the capture resolution is less than 1920 × 1080, it is recommended that the encoding resolution is not less than 1280 × 720.

## ◆ frameRate

- (NSInteger) frameRate
| read write nonatomic assign

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

## ◆ bitrate

- (NSInteger) bitrate
| read write nonatomic assign

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

## ◆ captureMouseCursor

- (BOOL) captureMouseCursor
| read write nonatomic assign

Whether to capture the mouse in screen sharing:

- `YES`: (Default) Capture the mouse.
- `NO`: Do not capture the mouse.
  Note
    Due to macOS system restrictions, setting this parameter to `NO` is ineffective during screen sharing (it has no impact when sharing a window).

## ◆ windowFocus

- (BOOL) windowFocus
| read write nonatomic assign

Whether to bring the window to the front when calling the `startScreenCaptureByWindowId:regionRect:captureParams:` method to share it:

- `YES`: Bring the window to the front.
- `NO`: (Default) Do not bring the window to the front.
  Note
    Due to macOS system limitations, when setting this member to bring the window to the front, if the current app has multiple windows, only the main window will be brought to the front.

## ◆ excludeWindowList

- (NSArray* _Nullable) excludeWindowList
| read write nonatomic copy

The ID list of the windows to be blocked. When calling `startScreenCaptureByDisplayId:regionRect:captureParams:` to start screen sharing, you can use this parameter to block a specified window. When calling `updateScreenCaptureParameters:` to update screen sharing configurations, you can use this parameter to dynamically block a specified window.

## ◆ highLighted

- (BOOL) highLighted
| read write nonatomic assign

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 this parameter to `YES`.

## ◆ highLightColor

- (COLOR_CLASS* _Nullable) highLightColor
| read write nonatomic strong

On macOS, `COLOR_CLASS` refers to `NSColor`.

## ◆ highLightWidth

- (NSUInteger) highLightWidth
| read write nonatomic assign

The width (px) of the border. The default value is 5, and the value range is (0, 50].

Note
  This parameter only takes effect when `highLighted` is set to `YES`.

## ◆ captureAudio

- (BOOL) captureAudio
| read write nonatomic assign