AgoraScreenCaptureParameters Class Reference

Inherits from NSObject
Declared in AgoraObjects.h

Overview

Properties of the screen sharing encoding parameters.

Note: The video profiles of the shared screen stream are only set by AgoraScreenCaptureParameters, independent of setVideoEncoderConfiguration .

  dimensions

The video encoding resolution of the shared screen stream

@property (assign, nonatomic) CGSize dimensions

Discussion

The default value is 1920 * 1080 pixels, that is, 2073600 pixels. Agora uses the value of this parameter to calculate the charges.

If the aspect ratio is different between the encoding dimensions and screen dimensions, Agora applies the following algorithms for encoding. Suppose the encoding dimensions are 1920 * 1080:

  • If the value of the screen dimensions is lower than that of the encoding dimensions, for example, 1000 * 1000, the SDK uses 1000 * 1000 for encoding.
  • If the value of the screen dimensions is higher than that of the encoding dimensions, for example, 2000 * 1500, the SDK uses the maximum value under 1920 * 1080 with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 * 1080.

In either case, Agora uses the value of this parameter to calculate the charges.

Declared In

AgoraObjects.h

  frameRate

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

@property (assign, nonatomic) NSInteger frameRate

Declared In

AgoraObjects.h

  bitrate

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

@property (assign, nonatomic) NSInteger bitrate

Declared In

AgoraObjects.h

  captureMouseCursor

Sets whether to capture the mouse for screen sharing.

@property (assign, nonatomic) BOOL captureMouseCursor

Discussion

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

Declared In

AgoraObjects.h

  windowFocus

Whether to bring the window to the front when calling startScreenCaptureByWindowId to share the window:

@property (assign, nonatomic) BOOL windowFocus

Availability

v3.1.0

Discussion

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

Declared In

AgoraObjects.h

  excludeWindowList

A list of IDs of windows to be blocked.

@property (copy, nonatomic) NSArray *excludeWindowList

Availability

v3.1.0

Discussion

When calling startScreenCaptureByDisplayId 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 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.

Declared In

AgoraObjects.h

  highLighted

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

@property (assign, nonatomic) BOOL highLighted

Availability

v3.7.0

Discussion

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

Declared In

AgoraObjects.h

  highLightColor

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

@property (strong, nonatomic) COLOR_CLASS *highLightColor

Availability

v3.7.0

Discussion

on macOS, COLOR_CLASS refers to NSColor.

Declared In

AgoraObjects.h

  highLightWidth

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

@property (assign, nonatomic) NSUInteger highLightWidth

Availability

v3.7.0

Declared In

AgoraObjects.h