Permissions

The OS gates access to sensitive hardware and system features behind a per-app permission grant. The permissions namespace lets you check what's granted right now, prompt the user for a specific permission, or deep-link them straight to the relevant Settings pane.

Check all at once

Snapshot every permission you might care about — useful on app start to gate features:

const snap = await window.deskifier.permissions.getAll();
// {
//   cameraPermissionStatus: 'granted' | 'denied' | 'not-determined' | 'restricted' | 'unknown',
//   microphonePermissionStatus: ...,
//   screenPermissionStatus: ...,
//   notificationPermissionStatus: ...,
//   accessibilityPermissionStatus: ...,
// }

Request one

Trigger the OS prompt for a specific permission. Silent no-op if already granted:

await window.deskifier.permissions.request({ permission: 'camera' });
// permission: 'camera' | 'microphone' | 'screenSharing' | 'accessiblity'

Some permissions (screen sharing, accessibility) can only be granted by the user via System Settings — there is no popup. Once denied, request returns immediately with the last-known status; deep-link the user to Settings instead.

For permissions the user needs to grant manually, or for changing a previously-denied grant:

await window.deskifier.permissions.openSettings({ target: 'screenSharing' });
// target: 'camera' | 'microphone' | 'screenSharing' | 'accessibility' | 'notification'

Opens the OS's Settings app to the correct pane, so the user is one click away from flipping the toggle.

Platform notes

  • macOS: full support for all permission types.
  • Windows / Linux: camera/microphone are handled by the browser engine (Chromium) rather than an OS-level grant, so getAll reports granted by default. Accessibility and screen-sharing have no OS analog on these platforms.