chrome.desktopCapture
Description: |
Desktop Capture API that can be used to capture content of screen, individual windows or tabs.
|
Availability: |
Since Chrome 35.
|
Permissions: |
"desktopCapture"
|
Summary
Types | |
---|---|
DesktopCaptureSourceType | |
Methods | |
chooseDesktopMedia −
integer
chrome.desktopCapture.chooseDesktopMedia(array of DesktopCaptureSourceType sources, tabs.Tab targetTab, function callback)
| |
cancelChooseDesktopMedia −
chrome.desktopCapture.cancelChooseDesktopMedia(integer desktopMediaRequestId)
|
Types
DesktopCaptureSourceType
Enum |
---|
"screen" ,
"window" ,
"tab" ,
or "audio"
|
Methods
chooseDesktopMedia
integer
chrome.desktopCapture.chooseDesktopMedia(array of DesktopCaptureSourceType sources, tabs.Tab targetTab, function callback)
Shows desktop media picker UI with the specified set of sources.
Parameters | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
array of DesktopCaptureSourceType | sources |
Set of sources that should be shown to the user. The sources order in the set decides the tab order in the picker. |
|||||||||
tabs.Tab | (optional) targetTab |
Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches |
|||||||||
function | callback |
The callback parameter should be a function that looks like this: function(string streamId, object options) {...};
|
cancelChooseDesktopMedia
chrome.desktopCapture.cancelChooseDesktopMedia(integer desktopMediaRequestId)
Hides desktop media picker dialog shown by chooseDesktopMedia().
Parameters | ||
---|---|---|
integer | desktopMediaRequestId |
Id returned by chooseDesktopMedia() |