main/permission-prompt
Interfaces
Section titled “Interfaces”PermissionPrompts
Section titled “PermissionPrompts”Defined in: app/src/main/permission-prompt.ts:20
The questions of sites for permissions and screens, in the overlay of their window.
Methods
Section titled “Methods”askForPermissions()
Section titled “askForPermissions()”askForPermissions(
window,contents,origin,permissions):Promise<PermissionDecision|undefined>
Defined in: app/src/main/permission-prompt.ts:30
Asks whether a site may use some permissions. Questions wait for the one before them in the window; the same question of a page shares one prompt.
Parameters
Section titled “Parameters”window
Section titled “window”The window of the page.
contents
Section titled “contents”WebContents
The page, the window’s visible tab.
origin
Section titled “origin”string
The origin of the page.
permissions
Section titled “permissions”readonly SitePermission[]
What the site wants.
Returns
Section titled “Returns”Promise<PermissionDecision | undefined>
The answer, or nothing when the prompt closed without one.
chooseScreen()
Section titled “chooseScreen()”chooseScreen(
window,contents,origin,callback):void
Defined in: app/src/main/permission-prompt.ts:43
Lets the user choose a screen or a window for a site to see, or nothing.
Parameters
Section titled “Parameters”window
Section titled “window”The window of the page.
contents
Section titled “contents”WebContents
The page, the window’s visible tab.
origin
Section titled “origin”string
The origin of the page.
callback
Section titled “callback”(streams) => void
Electron’s answer; null refuses.
Returns
Section titled “Returns”void
ScreenSystem
Section titled “ScreenSystem”Defined in: app/src/main/permission-prompt.ts:74
The system that the browser runs on, as Chromium reads it to pick how to share screens.
Properties
Section titled “Properties”
readonlyenv:Readonly<Record<string,string|undefined>>
Defined in: app/src/main/permission-prompt.ts:76
platform
Section titled “platform”
readonlyplatform:Platform
Defined in: app/src/main/permission-prompt.ts:75
Type Aliases
Section titled “Type Aliases”SourceLister
Section titled “SourceLister”SourceLister = (
options) =>Promise<DesktopCapturerSource[]>
Defined in: app/src/main/permission-prompt.ts:71
Lists screens and windows, as Electron’s desktop capturer does.
Parameters
Section titled “Parameters”options
Section titled “options”Electron.SourcesOptions
Returns
Section titled “Returns”Promise<DesktopCapturerSource[]>
Functions
Section titled “Functions”listScreenSources()
Section titled “listScreenSources()”listScreenSources(
logger,list?,system?):Promise<DesktopCapturerSource[]>
Defined in: app/src/main/permission-prompt.ts:85
Lists the screens and windows that a site may see.
Parameters
Section titled “Parameters”logger
Section titled “logger”Records windows that could not be listed.
SourceLister = ...
Lists sources; Electron’s desktop capturer by default.
system?
Section titled “system?”ScreenSystem = ...
The system; the running one by default.
Returns
Section titled “Returns”Promise<DesktopCapturerSource[]>
permissionPrompts()
Section titled “permissionPrompts()”permissionPrompts(
overlay,router,logger):PermissionPrompts
Defined in: app/src/main/permission-prompt.ts:115
The prompts for permissions. They load with the first question of a site.
Parameters
Section titled “Parameters”overlay
Section titled “overlay”What the overlays of all windows share.
router
Section titled “router”IPC router.
logger
Section titled “logger”Logger.