getScreenCaptureSources abstract method

Future<List<ScreenCaptureSourceInfo>> getScreenCaptureSources({
  1. required SIZE thumbSize,
  2. required SIZE iconSize,
  3. required bool includeScreen,
})

Gets a list of shareable screens and windows.

You can call this method before sharing a screen or window to get a list of shareable screens and windows, which enables a user to use thumbnails in the list to easily choose a particular screen or window to share. This list also contains important information such as window ID and screen ID, with which you can call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start the sharing. This method applies to macOS and Windows only.

  • thumbSize The target size of the screen or window thumbnail (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and thumbSize is 100 × 100, the actual size of the thumbnail is 100 × 75. If the target size is larger than the original size, the thumbnail is the original image and the SDK does not scale it.
  • iconSize The target size of the icon corresponding to the application program (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and iconSize is 100 × 100, the actual size of the icon is 100 × 75. If the target size is larger than the original size, the icon is the original image and the SDK does not scale it.
  • includeScreen Whether the SDK returns the screen information in addition to the window information: true : The SDK returns screen and window information. false : The SDK returns window information only.

Returns The ScreenCaptureSourceInfo array.

Implementation

Future<List<ScreenCaptureSourceInfo>> getScreenCaptureSources(
    {required SIZE thumbSize,
    required SIZE iconSize,
    required bool includeScreen});