Skip to content
Web Design & Development

A Practical Guide to Camera and Microphone Access

Browser APIs that capture video and audio from a user's device, used for calls, scanning and recording.

Marcus Adeyemi Technical Director 2 min read 22 views
A Practical Guide to Camera and Microphone Access

Why does it matter?

These permissions are sensitive, and users need clear indication of when capture is active.

What are the numbers?

  • getUserMedia requests camera and microphone streams
  • Secure context capture requires HTTPS
  • Indicators browsers show when capture is active
  • Device selection users may have several cameras and microphones

What should I do?

  1. Request access at the moment of use
  2. Explain the purpose beforehand
  3. Let users choose devices
  4. Stop tracks when finished
  5. Handle permission denial with alternatives
What to do and what to avoid with camera and microphone access, side by side
Good practice against the usual mistakes, from the sources listed below.

What should I avoid?

Avoid:

  • Requesting access on load
  • Leaving streams running
  • Hiding that recording is happening
  • Assuming one camera exists

When should I get help?

Short answer Bring in help when building video or scanning features.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Web Design & Development