Reputation: 31
I've been trying to use my built-in camera for Teams (for an interview!) in Google Chrome on my Dell XPS 15 9530, Windows 11 but it kept being blocked. Also, blocked in Microsoft Edge but it works in Firefox and the desktop camera is fine.
I've checked any suggested Windows, Norton and Chrome settings and nothing works.
I've updated all the browsers and drivers (using Norton tools), and rebooted several times, which also ensured nothing else was using the camera.
Microsoft CoPilot suggested the following code to demonstrate it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webcam Stream</title>
</head>
<body>
<h1>Webcam Stream</h1>
<video id="webcam" autoplay playsinline></video>
<script src="script.js"></script>
</body>
</html>
With the following script:
const video = document.getElementById('webcam');
if (navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
video.srcObject = stream;
})
.catch(error => {
console.error('Error accessing webcam: ', error);
});
} else {
console.error('getUserMedia not supported by your browser.');
}
I ran this in Chrome, Edge and Firefox via IntelliJ and found that Chrome and Edge gave the following error on the console:
script.js:9 Error accessing webcam: NotReadableError: Could not start video source
However, it works perfectly in Firefox.
Any suggestions?
Upvotes: 0
Views: 131
Reputation: 12999
It looks like by design in chromium. You can refer to this feature request. If the desktop camera works in chromium browsers, I suggest that you can still use desktop camera. Or you can remove your desktop camera then check if the built-in camera can work.
You can also upvote the feature request to see if chromium will implement this feature in the future.
Upvotes: 0