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 the screen contents requires user consent on macOS 10.15 Catalina or higher, which can detected by systemPreferences.getMediaAccessStatus
.