I have a JSF web application which uses a webcam to capture the image using Primefaces p:webcam
.
It works fine except the fact, giving the following warning every time the page loads on computers that do not have a webcam.
Webcam.js Error: Could not access webcam: NotFoundError: Requested device not found NotFoundError: Requested device not found
How can I suppress that warning?
Try to separate the part of the page from the page given to all users.
For example, the page has a link "Click here to capture". Direct it to a new page or display a dialog with a part that is rendered only when going to capture the image.