Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScreenCaptureParameters

Screen sharing encoding parameters.

Hierarchy

  • ScreenCaptureParameters

Index

Constructors

constructor

  • new ScreenCaptureParameters(dimensions?: VideoDimensions, frameRate?: number, bitrate?: number, captureMouseCursor?: boolean, windowFocus?: boolean, excludeWindowList: any[], excludeWindowCount?: number): ScreenCaptureParameters
  • Parameters

    • Default value dimensions: VideoDimensions = new VideoDimensions(1920, 1080)
    • Default value frameRate: number = 5
    • Default value bitrate: number = STANDARD_BITRATE
    • Default value captureMouseCursor: boolean = true
    • Default value windowFocus: boolean = false
    • excludeWindowList: any[]
    • Default value excludeWindowCount: number = 0

    Returns ScreenCaptureParameters

Properties

bitrate

bitrate: number

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

captureMouseCursor: boolean

Sets whether or not to capture the mouse for screen sharing:

  • true: (Default) Capture the mouse.
  • false: Do not capture the mouse.

dimensions

dimensions: VideoDimensions

The maximum encoding dimensions of the shared region in terms of width * height.

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

excludeWindowCount

excludeWindowCount: number

The number of windows to be blocked.

excludeWindowList

excludeWindowList: any[]

A list of IDs of windows to be blocked.

  • When calling [startScreenCaptureByScreenRect]{@link agora.startScreenCaptureByScreenRect} to start screen sharing, you can use this parameter to block the specified windows.
  • When calling [updateScreenCaptureParameters]{@link agora.updateScreenCaptureParameters} to update the configuration for screen sharing, you can use this parameter to dynamically block the specified windows during screen sharing.

frameRate

frameRate: number

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.

windowFocus

windowFocus: boolean

Whether to bring the window to the front when calling [startScreenCaptureByWindowId]{@link agora.startScreenCaptureByWindowId} to share the window:

  • true: Bring the window to the front.
  • false: (Default) Do not bring the window to the front.

Generated using TypeDoc