问题
As far as I know, in browser, such as Chrome, sharing desktop or application needs a Chrome Extension to work, eg:
chrome.permissions.request({
permissions: ['desktopCapture'],
}
But why does Google Hangouts do not need any extension to capture desktop?
Is there any API of JavaScript for this?
回答1:
As of now, Google Hangouts does use an extension, it's just integrated into Chrome to the point of not being visible.
Source: Chromium issue to remove this special treatment
You can test that it is (stealthily) installed by manually opening
chrome-extension://nkeimhogjdpnpccoofpliimaahmaaome/background.html
At the same time, work is ongoing to support WebRTC spec for screen sharing (getDisplayMedia
) in Chrome. It's not yet enabled by default in released Chrome versions, but will be very soon (code is already in the codebase).
Implementation tracking: Chromium issue
来源:https://stackoverflow.com/questions/53410809/why-does-google-hangouts-support-sharing-desktop-without-chrome-extension-in-lat