A browser webcam can fail even when the same camera works in another application. Browser camera access depends on several layers at once: a secure page, site permission, browser settings, operating-system privacy, device availability, a usable driver, and media constraints the camera can satisfy.
Fastest diagnosis
Test the camera in one browser tab, close competing apps, and read the browser error category.
Open Online Webcam Test, start only the camera, allow access, and select the intended device. A permission failure, missing-device failure, camera-in-use failure, and black preview require different fixes.
First identify the symptom
| Symptom | Most likely layer | First action |
|---|---|---|
| No permission prompt | Saved denial, browser default, managed policy, insecure page, or embedded-frame restriction | Inspect site permission and page security |
| Permission denied | Site decision, browser setting, or OS privacy | Reset the site decision and check OS access |
| No camera in the list | Disconnected, disabled, blocked, driver problem, or privacy-limited enumeration | Grant access, reconnect, and refresh devices |
| Camera listed but will not start | Another app, driver, hardware, or OS access failure | Close competing apps and restart the browser |
| Preview is black | Shutter, wrong camera, lighting, virtual source, driver, or stalled stream | Open the shutter and switch devices |
| Wrong camera opens | Default or remembered device | Select the intended camera after permission |
| Request fails at a specific resolution | Overconstrained media request | Use a lower or ideal resolution instead of an exact requirement |
Understand the browser error categories
The getUserMedia() API rejects with different errors. The exact message shown by a site can vary, but the error name helps narrow the cause.
NotAllowedError
This usually means the browser or operating system did not allow camera access. MDN also documents that an insecure HTTP context or restrictive Permissions Policy can produce this class of failure.
Check:
- The page uses HTTPS.
- The site's camera permission is set to Allow or Ask.
- The browser application has OS-level camera access.
- A managed policy has not disabled camera use.
- An embedded frame is explicitly allowed to use the camera.
NotFoundError
The browser could not find a camera track that satisfied the request. The device can be disconnected, disabled, missing a driver, hidden by permission state, or incompatible with mandatory constraints.
NotReadableError
Permission may be granted, but the browser cannot read the device because of a hardware, operating-system, browser, or page-level problem. A camera held by another application is a common practical cause, although driver behavior differs by device.
OverconstrainedError
The requested camera constraints are impossible to satisfy. For example, an exact device ID, exact facing mode, or minimum resolution can reject when no available source matches.
AbortError or InvalidStateError
An unexpected start failure or an inactive document can stop the request. Reload the page, bring the tab to the foreground, and test again after closing duplicate tabs.
Check the physical camera first
- Open a privacy shutter or sliding lens cover.
- Reconnect a USB camera directly instead of through a failing hub.
- Confirm the cable supports data and not only power.
- Try another USB port.
- Check whether a laptop keyboard shortcut or hardware switch disables the camera.
- Remove any lens cap.
- Use enough light to distinguish a black stream from an extremely dark image.
A physical shutter can leave the camera technically active while producing a black preview. The browser may show no permission or device error because the media stream is valid.
Close applications that may be using the camera
Meeting clients, recording software, streaming tools, virtual-camera utilities, security products, another browser profile, or another tab can hold the camera. Some drivers support sharing; others allow only one active consumer.
Release competing camera sessions
- Leave active video calls.
- Close camera, recording, streaming, and virtual-camera applications.
- Close duplicate webcam-test tabs.
- Quit and reopen the browser.
- Reconnect the camera.
- Restart the operating system if the device remains locked.
Reset the site's camera permission
A saved block can prevent a new prompt. Use the site's permission control or browser settings to remove the old decision, then reload the page.
- Chrome: open the site information control or Settings → Privacy and security → Site settings → Camera.
- Edge: review the site's camera permission and Windows camera privacy settings.
- Firefox: use the address-bar permission icon or Privacy & Security → Permissions → Camera.
- Safari: use Safari → Settings → Websites → Camera and select Ask or Allow.
If the permission control is locked, a workplace or school administrator may manage it.
Check operating-system privacy
Windows
Microsoft documents separate Windows controls for device camera access, application access, and desktop-app access. A website can be allowed in Edge or Chrome while Windows still prevents the browser application from opening the camera.
Review Settings → Privacy & security → Camera and confirm that camera access and desktop-app access are enabled for the intended browser environment.
macOS
Apple places browser camera access under System Settings → Privacy & Security → Camera. Safari also has per-website camera settings. Both layers must permit the test.
On a Mac with a built-in camera, Apple documents that the green camera light turns on when the camera is active. A missing indicator can help distinguish a permission or start failure from a dark but active preview.
Refresh the device list after permission
Browsers can omit non-default devices before permission. The enumerateDevices() result is also filtered by Permissions Policy and user permission. After allowing access:
- Stop the existing stream.
- Refresh the camera list.
- Select the intended device by its visible label.
- Start the camera again.
If an external webcam still does not appear, disconnect and reconnect it, then reload the page.
Fix the wrong camera
A laptop may expose:
- A built-in front camera.
- An infrared or depth camera.
- An external USB webcam.
- A virtual camera from streaming software.
- A mobile-device continuity camera.
Select the camera that produces the expected preview. A black or low-resolution source can be a virtual or infrared device rather than the normal webcam.
Fix a black preview
A black preview can result from:
- A closed shutter.
- A dark room or covered lens.
- The wrong camera source.
- A virtual camera with no active scene.
- A stalled track after switching devices.
- A driver or hardware failure.
- A page that received a stream but did not begin playback.
Try these steps in order:
- Move to a well-lit area and uncover the lens.
- Switch to another listed camera.
- Stop the camera, then start it again.
- Reload the page.
- Close other camera apps.
- Test the same camera in the operating system's camera application.
Relax impossible media constraints
A browser can treat simple resolution values as preferences, but exact, min, and max constraints can make a source mandatory. If no camera satisfies an exact requirement, the request can fail before a prompt.
For troubleshooting, request ordinary video first. After the camera opens, inspect the actual track settings and increase quality gradually.
| Constraint style | Behavior | Troubleshooting use |
|---|---|---|
video: true | Any available camera track | Best first test |
| Plain width and height | Ideal preference | Useful after basic access works |
exact device or resolution | Mandatory match | Can fail when the device changes or does not support it |
| Minimum resolution | Rejects lower-capability sources | Remove during diagnosis |
Test another browser profile
Extensions, enterprise policy, saved site permission, corrupted profile settings, and experimental flags can affect one profile. A clean profile can separate browser-profile problems from OS or hardware problems.
Do not use a second browser result as proof that the first browser is defective. The browsers can have different permissions and media defaults. Compare the same camera under equivalent conditions.
When to update or reinstall the driver
Escalate to the driver or hardware layer when:
- The camera is missing from multiple trusted applications.
- The operating system reports a device error.
- The camera repeatedly disconnects.
- All browser permissions and privacy controls are correct.
- The camera fails after another device or cable is tested successfully.
Use the camera or computer manufacturer's current support instructions. Avoid installing drivers from unrelated download sites.
Final camera checklist
Verify each layer once
- HTTPS page.
- Site camera permission.
- Browser default and selected camera.
- Windows or macOS privacy permission.
- Physical shutter and cable.
- No competing camera application.
- Device appears after permission.
- Basic unconstrained stream opens.
- Preview works in good lighting.
- Local picture capture succeeds.
For a saved denial or missing prompt, continue with Browser Camera Permission Blocked. For a complete camera-and-audio procedure, use How to Test a Webcam and Microphone.
FAQ
Why does my webcam work in one app but not in the browser?
The browser has its own site permission and also depends on operating-system camera access. The other app may be allowed while the browser or the specific site is blocked.
What does a NotAllowedError mean for a webcam?
It usually means camera access was denied, blocked by browser or operating-system policy, unavailable in an insecure context, or disallowed by Permissions Policy.
What does a NotReadableError mean?
It means permission may exist but the browser could not read the camera because of a hardware, operating-system, browser, or page-level access failure.
Can another application make the browser webcam preview black?
Yes. Some camera drivers or virtual-camera setups allow only one active user, so a meeting app, recorder, security program, or another browser tab can prevent access.
Why is the wrong webcam selected?
The browser can prefer a default device, a previously selected device, or the first available device. Grant permission, refresh the device list, and select the intended camera.
When should I suspect a hardware or driver problem?
Suspect hardware or driver trouble when the camera fails in multiple trusted apps after permission, device selection, cable, shutter, restart, and operating-system privacy checks.