WebRTC Metrics

A comprehensive overview of WebRTC statistics, derived indicators, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats

Back
peripheralbehavior

Not allowed to use the device

The user or the operating system denied access to the requested microphone or camera.

Description

getUserMedia rejects with a NotAllowedError when the browser is not allowed to access the requested media device. This typically happens when:

  • The user explicitly dismisses or rejects the permission prompt.
  • The site previously had its microphone or camera permission revoked (permanent deny).
  • The page is served over an insecure context (HTTP).
  • The operating system blocks the browser from accessing the device.
  • A Permissions Policy / Feature Policy disallows the media capture in the current frame.

When this error is raised, the user cannot send the corresponding media to remote participants.

What do we do here?

We look at every getUserMedia call. We mark an observation if the response returned contains the error NotAllowedError.

Notes

NotAllowedError is distinct from NotFoundError (no matching device) and NotReadableError (device in use). It only covers permission-related denials.

Our suggestions

  • Make sure the page is served over HTTPS.
  • Detect the rejection and display a clear instruction to re-enable the permission from the browser UI.
  • On macOS / Windows, guide the user to the system privacy settings if the browser itself is blocked.
  • If your app runs inside an iframe, verify the parent page sets an appropriate Permissions Policy (camera, microphone).