Merge pull request #14600 from electron/media-permission

feat: add mediaTypes to media permission requests
This commit is contained in:
John Kleinschmidt 2018-09-13 10:39:08 -04:00 committed by GitHub
commit 429b18d7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -295,6 +295,8 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
* `permissionGranted` Boolean - Allow or deny the permission.
* `details` Object - Some properties are only available on certain permission types.
* `externalURL` String - The url of the `openExternal` request.
* `mediaTypes` String[] - The types of media access being requested, elements can be `video`
or `audio`
Sets the handler which can be used to respond to permission requests for the `session`.
Calling `callback(true)` will allow the permission and `callback(false)` will reject it.