getScreenCaptureSources abstract method
Future<List<ScreenCaptureSourceInfo> >
getScreenCaptureSources({
- required SIZE thumbSize,
- required SIZE iconSize,
- required bool includeScreen,
Gets the list of shareable screen and window objects.
Before screen or window sharing, you can call this method to get a list of shareable screen and window objects, allowing users to select a screen or window to share via thumbnails in the list. The list contains important information such as window ID and screen ID. After obtaining the ID, you can call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start sharing. This method is only applicable to macOS and Windows.
thumbSizeThe target size (in pixels) of the thumbnail for the screen or window. The SDK scales the original image to match the longest side of the target size while maintaining the aspect ratio. For example, if the original size is 400 × 300 and thumbSize is 100 × 100, the actual thumbnail size is 100 × 75. If the target size is larger than the original, the thumbnail is the original image and no scaling is applied.iconSizeThe target size (in pixels) of the icon corresponding to the application. The SDK scales the original image to match the longest side of the target size while maintaining the aspect ratio. For example, if the original size is 400 × 300 and iconSize is 100 × 100, the actual icon size is 100 × 75. If the target size is larger than the original, the icon is the original image and no scaling is applied.includeScreenWhether the SDK returns screen information in addition to window information: true : SDK returns both screen and window information. false : SDK returns only window information.
Returns An array of ScreenCaptureSourceInfo.
Implementation
Future<List<ScreenCaptureSourceInfo>> getScreenCaptureSources(
{required SIZE thumbSize,
required SIZE iconSize,
required bool includeScreen});