How the test works
The camera test uses the MediaDevices API (navigator.mediaDevices.getUserMedia()) to request access to your device's camera. When you grant permission, the browser opens a video stream from the default camera (typically the front-facing camera on mobile devices).
The video stream is rendered in a <video> element with autoplay and playsinline attributes. The test requests video with facingMode: 'user' to prefer the front-facing camera, though the browser may select a different camera if the preferred one is unavailable.
When you click "Take Snapshot", the test draws the current video frame onto a hidden <canvas> element using ctx.drawImage(video, 0, 0). This captures a still image at the camera's native resolution. The canvas is then displayed for visual inspection.
What the test detects
Whether the camera responds to browser requests, produces a visible video feed, and captures a still image. The test lets you visually assess focus quality, color accuracy, exposure, and whether the correct camera (front vs rear) is active.
What the test cannot detect
The test cannot determine the camera sensor's electrical health, measure signal-to-noise ratio, detect lensε ε¦ defects invisible in the preview, or test camera features that require manufacturer-specific APIs (like optical image stabilization, laser autofocus, or night mode). Auto-focus and auto-exposure are controlled by the operating system, not the browser.
Environmental factors
Camera results depend heavily on lighting conditions, lens cleanliness, and whether another application is using the camera. A dirty lens can make a perfectly functional camera appear defective. Always clean the lens and ensure adequate lighting before concluding the camera has a hardware problem.