How To Access Front and Rear Cameras with JavaScript’s getUserMedia()
With HTML5 came the introduction of APIs with access to device hardware, including the MediaDevices API. This API provides access to media input devices like audio and video. In this tutorial, you’ll see how to get access to the video feeds from a user’s device cameras.