selectScreenCaptureTarget abstract method

void selectScreenCaptureTarget(
  1. TRTCScreenCaptureSourceInfo source,
  2. TRTCRect rect,
  3. TRTCScreenCaptureProperty property
)

Select the screen or window to share (for desktop systems only)

After you get the sharable screens and windows through getScreenCaptureSources , you can call this API to select the target screen or window you want to share.

During the screen sharing process, you can also call this API at any time to switch the sharing target.

The following four sharing modes are supported:

  • Sharing the entire screen:
    • For source whose type is Screen in sourceInfoList, set captureRect to {0, 0, 0, 0}.
  • Sharing a specified area:
    • For source whose type is Screen in sourceInfoList, set captureRect to a non-nullptr value, e.g., {100, 100, 300, 300}.
  • Sharing an entire window:
    • For source whose type is Window in sourceInfoList, set captureRect to {0, 0, 0, 0}.
  • Sharing a specified window area:
    • For source whose type is Window in sourceInfoList, set captureRect to a non-nullptr value, e.g., {100, 100, 300, 300}.

Parameters:

Note:

  • Setting the highlight border color and width parameters does not take effect on macOS.

Implementation

void selectScreenCaptureTarget(TRTCScreenCaptureSourceInfo source, TRTCRect rect, TRTCScreenCaptureProperty property);