ScreenCaptureSourceInfo

Information about shareable windows or screens.

export class ScreenCaptureSourceInfo {
  
  type?: ScreenCaptureSourceType;
  
  sourceId?: any;
  
  sourceName?: string;
  
  thumbImage?: ThumbImageBuffer;
  
  iconImage?: ThumbImageBuffer;
  
  processPath?: string;
  
  sourceTitle?: string;
  
  primaryMonitor?: boolean;

  position?: Rectangle;

  minimizeWindow?: boolean;

  sourceDisplayId?: any;
}

Properties

type
Type of the sharing target. See ScreenCaptureSourceType.
sourceId
For windows, indicates the Window ID; for screens, indicates the Display ID.
sourceName
Name of the window or screen. UTF-8 encoded.
thumbImage
Image content of the thumbnail. See ThumbImageBuffer.
iconImage
Image content of the icon. See ThumbImageBuffer.
processPath
Process to which the window belongs. UTF-8 encoded.
sourceTitle
Window title. UTF-8 encoded.
primaryMonitor
Whether the screen is the primary display:
  • true: The screen is the primary display.
  • false: The screen is not the primary display.
position
Position of the window relative to the entire screen space (including all shareable screens). See Rectangle.
minimizeWindow
(Windows only) Whether the window is minimized:
  • true: The window is minimized.
  • false: The window is not minimized.
sourceDisplayId
(Windows only) ID of the screen where the window is located. If the window spans multiple screens, it refers to the screen with the largest intersecting area. If the window is outside the visible screen, the value is -2.