getSources
abstract fun getSources(options: SourcesOptions): Promise<ReadonlyArray<DesktopCapturerSource>>(source)
Resolves with an array of DesktopCapturerSource objects, each DesktopCapturerSource represents a screen or an individual window that can be captured.
!NOTE
Capturing audio requires
NSAudioCaptureUsageDescriptionInfo.plist key on macOS 14.2 Sonoma and higher - read more.
Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher, which can detected by
systemPreferences.getMediaAccessStatus.