JavaScript not asking permission to use camera
Briefly

The provided JavaScript code attempts to initialize a webcam using a custom 'webCam' class. However, it fails to ask the user for permission to access the camera. This can be attributed to several factors, including browser settings for camera access, security constraints, or issues with how the 'webCam' class is instantiated. Ensure the page is served over HTTPS, as camera access typically requires a secure context. Additionally, reviewing any errors in the browser console can provide insight into what might be going wrong.
The code attempts to access the user's webcam but fails to prompt for permission, likely due to issues in the way the webCam class is instantiated.
Ensure that the browser supports the required MediaDevices API and that permissions settings allow camera access, especially from secure origins.
Debugging the console can help identify any errors relating to video stream access that might be preventing the camera from initializing.
Review related documentation on the webCam library to ensure proper implementation and compatibility with your specific browser environment.
Read at SitePoint Forums | Web Development & Design Community
[
|
]