PermissionState

interface PermissionState

The state of a Camera or Microphone permission, as returned by useCameraPermission or useMicrophonePermission.

Properties

canRequestPermission

canRequestPermission: boolean

Whether the app can still request this permission (status is 'not-determined'). If this is false but hasPermission is also false, the user must grant the permission from the system Settings.


hasPermission

hasPermission: boolean

Whether the app has been granted this permission (status is 'authorized').


requestPermission()

requestPermission: () => Promise<boolean>

Requests the permission from the user.

Resolves with whether the permission was granted after the request completed. Can only be called if canRequestPermission is true.


status

The current raw PermissionStatus.

On this page