security: allow to block desktopCapturer.getSources() calls (#15964)
* security: allow to block desktopCapturer.getSources() calls * return empty instead of error * fix: release resources of DesktopCapturer on exit
This commit is contained in:
parent
df0381e76c
commit
547097b036
9 changed files with 76 additions and 16 deletions
|
@ -377,6 +377,10 @@ WebContents.prototype._init = function () {
|
|||
})
|
||||
})
|
||||
|
||||
this.on('desktop-capturer-get-sources', (event, ...args) => {
|
||||
app.emit('desktop-capturer-get-sources', event, this, ...args)
|
||||
})
|
||||
|
||||
this.on('remote-require', (event, ...args) => {
|
||||
app.emit('remote-require', event, this, ...args)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue