Tech WebRTC — Switch Cameras using Javascript getUserMedia To fetch or toggle between the front-facing camera and the back camera, we can simply use the "facingMode" which is widely supported in the majority of the browsers.