Debugging the Browser Camera API
I’ve been adding a feature to Garbs.net that lets you take photos directly from the browser using the ImageCapture API.
It was working great on my Pixel 9a, but when my sister tested on her Galaxy S21, all our closeup test shots were coming out blurry. The issue? Her phone has an extra ultrawide lens with a fixed focus, and my code wasn’t picking the correct camera.
After some digging, I discovered that Camera 0 (the “Main” camera) was being returned as index 3 or 4 on her device. The camera enumeration order isn’t consistent across phones.
To figure this out, I had Claude put together a client-side debug page that gives you a full glimpse into what a phone’s camera capabilities are. It shows all available video input devices, their constraints, and supported settings.
Check it out here: Camera Debug Tool
If you’re building anything with the browser camera APIs and running into device-specific quirks, this tool might save you some headaches.