DesktopCapturerSource Object
id
string -The identifier of a window or screen that can be used as a调用[chromeMediaSourceId
constraint when calling [navigator.webkitGetUserMedia
].navigator.webkitGetUserMedia
]时可用作chromeMediaSourceId
约束的窗口或屏幕的标识符。The format of the identifier will be标识符的格式将是window:XX:YY
orscreen:ZZ:0
.window:XX:YY
或screen:ZZ:0
。XX is the windowID/handle.XX是窗口ID/句柄。YY is 1 for the current process, and 0 for all others.YY对于当前进程为1,对于所有其他进程为0。ZZ is a sequential number that represents the screen, and it does not equal to the index in the source's name.ZZ是一个表示屏幕的序列号,它不等于源名称中的索引。name
string -A screen source will be named either屏幕源将被命名为Entire Screen
orScreen <index>
, while the name of a window source will match the window title.Entire Screen
或Screen <index>
,而窗口源的名称将与窗口标题相匹配。thumbnail
NativeImage -A thumbnail image.缩略图。Note:There is no guarantee that the size of the thumbnail is the same as the无法保证缩略图的大小与传递给thumbnailSize
specified in theoptions
passed todesktopCapturer.getSources
.desktopCapturer.getSources
的options
中指定的thumbnailSize
相同。The actual size depends on the scale of the screen or window.实际大小取决于屏幕或窗口的比例。display_id
string -A unique identifier that will correspond to the与Screen API返回的匹配Display的id
of the matching Display returned by the Screen API.id
相对应的唯一标识符。On some platforms, this is equivalent to the在某些平台上,这相当于上面XX
portion of theid
field above and on others it will differ.id
字段的XX
部分,而在其他平台上则有所不同。It will be an empty string if not available.如果不可用,它将是一个空字符串。appIcon
NativeImage -An icon image of the application that owns the window or null if the source has a type screen.拥有窗口的应用程序的图标图像,如果源具有类型屏幕,则为null
。The size of the icon is not known in advance and depends on what the application provides.图标的大小事先不知道,并且取决于应用程序提供的内容。