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.
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?
- Request access at the moment of use
- Explain the purpose beforehand
- Let users choose devices
- Stop tracks when finished
- Handle permission denial with alternatives
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
- MDN Web Docs — MediaDevices getUserMedia
- MDN Web Docs — Media Capture and Streams API
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.