-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathraw_desktopcapturer.go
34 lines (28 loc) · 1.35 KB
/
raw_desktopcapturer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package electron
import "github.com/gopherjs/gopherjs/js"
// DesktopCapturerModule [email protected]
//
// Access information about media sources that can be used to capture audio and
//video from the desktop using the navigator.webkitGetUserMedia API.
type DesktopCapturerModule struct {
*js.Object
// Starts gathering information about all available desktop media sources, and calls callback(error, sources) when finished. sources is an array of DesktopCapturerSource objects, each DesktopCapturerSource represents a screen or an individual window that can be captured.
GetSources func(Options *DesktopCapturerModuleGetSourcesOptions, Callback DesktopCapturerModuleGetSourcesCallback) `js:"getSources"`
}
func GetDesktopCapturerModule() *DesktopCapturerModule {
o := Get("desktopCapturer")
return &DesktopCapturerModule{
Object: o,
}
}
type DesktopCapturerModuleGetSourcesOptions struct {
*js.Object
// An array of Strings that lists the types of desktop sources to be captured, available types are and .
Types *js.Object `js:"types"`
// The suggested size that the media source thumbnail should be scaled to, defaults to .
ThumbnailSize *DesktopCapturerModuleOptionsThumbnailSize `js:"thumbnailSize"`
}
type DesktopCapturerModuleOptionsThumbnailSize struct {
*js.Object
}
type DesktopCapturerModuleGetSourcesCallback func(Error *js.Object, Sources *js.Object)