Despite receiving an error message, the program is running perfectly.
https://i.sstatic.net/4NQyR.jpg
var video = document.querySelector('#camera-stream'),
if(!navigator.getMedia){
displayErrorMessage("Your browser doesn't have support for the navigator.getUserMedia interface.");
}
else{
// Request the camera.
navigator.getMedia(
{
video: true
},
// Success Callback
function(stream:any){
// Create an object URL for the video stream and
// set it as src of our HTLM video element.
video.src = window.URL.createObjectURL(stream);
// Play the video element to start the stream.
video.play();
video.onplay = function() {
showVideo();
};
},
// Error Callback
function(err:any){
displayErrorMessage("There was an error with accessing the camera stream: " + err.name, err);
}
);
}
Attempts to resolve the issue using the solution provided in this question have proven unsuccessful.
What would be the appropriate resolution for this error?