startScreenCaptureByWindowId abstract method

Future<void> startScreenCaptureByWindowId(
  1. int windowId, [
  2. Rectangle? regionRect,
  3. ScreenCaptureParameters? captureParams
])

Shares the whole or part of a window by specifying the window ID. This method shares a window or part of the window. You need to specify the ID of the window to be shared. Call this method after joining a channel. This method applies to macOS and Windows only.

Param windowId The ID of the window to be shared.

Param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen. If the specified region overruns the window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole window.

Param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges.

Implementation

Future<void> startScreenCaptureByWindowId(int windowId,
    [Rectangle? regionRect, ScreenCaptureParameters? captureParams]);