selectScreenCaptureTarget method
Future<void>
selectScreenCaptureTarget(
- TRTCScreenCaptureSourceInfo sourceInfo,
- TRTCScreenCaptureProperty property, {
- int captureLeft = 0,
- int captureTop = 0,
- int captureRight = 0,
- int captureBottom = 0,
Select the screen or window you want to share (this interface only supports Windows)
After you obtain the screens and windows that can be shared through getScreenCaptureSources, you can call this interface to select the target screen or window you want to share.
During the screen sharing process, you can also call this interface at any time to switch the sharing target.
Support the following four cases:
- Share the entire screen: Type in SourceInfolist is Source of Screen, Capture is set to {0, 0, 0, 0}
- Share designated area: Type in SourceInfolist is Source of Screen.
- Share the entire window: Type in SourceInfolist is Source of Window, Capture is set to {0, 0, 0, 0}
- Sharing window area: Type in SourceInfolist is Source of Window.
Parameters:
sourceInfo
Specify the sharing source
property
Specify the attributes of the screen sharing target, including capture mouse, highlight capture window, etc. For details, refer to TRTCScreenCaptureProperty definition
captureLeft
& captureTop
& captureRight
& captureBottom
Specify the capture area
Implementation
Future<void> selectScreenCaptureTarget(TRTCScreenCaptureSourceInfo sourceInfo, TRTCScreenCaptureProperty property, {
int captureLeft = 0,
int captureTop = 0,
int captureRight = 0,
int captureBottom = 0,
}) async {
return await _cloudChannel!.invokeMethod('selectScreenCaptureTarget', {
"sourceInfo": sourceInfo.toJson(),
"property": property.toJson(),
"captureLeft": captureLeft,
"captureTop": captureTop,
"captureRight": captureRight,
"captureBottom": captureBottom,
});
}