getSources

abstract fun getSources(options: SourcesOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<electron/core/DesktopCapturerSource>>(source)

Resolves with an array of DesktopCapturerSource objects, each DesktopCapturerSource represents a screen or an individual window that can be captured.

Note Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher, which can detected by systemPreferences.getMediaAccessStatus.