I get this error in Firefox 51 when I try to execute the following code, and when I select my camera for a laptop:
navigator.getMedia = (navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mediaDevices.getUserMedia ||
navigator.msGetUserMedia);
navigator.getMedia({
video: true,
audio: false
},
function(stream) {
if (navigator.mozGetUserMedia) {
video.mozSrcObject = stream;
} else {
var vendorURL = window.URL || window.webkitURL;
video.src = vendorURL.createObjectURL(stream);
}
video.play();
},
function(err) {
console.log("An error occured! " + err);
}
);
Mistake:
NotReadableError: Failed to allocate videosource
Can someone clarify what this means? Is my webcam broken? Yesterday I used it with a script without any problems. It does not stand out for another application.
source
share