Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Firstly great app, I enjoyed using this on my baby daughter crawling around the living room! Keep up the good work :)

If you were to implement a camera picker, take a gander at: https://webrtc.github.io/samples/src/content/devices/input-o...

iOS and Android don't have the same camera picker like Chrome on Windows 10, even then it is difficult to always override. I would recommend using enumerateDevices to allow you to pass the deviceId when firing getUserMedia. Not a lot of work. Implemented this a few times for cross-browser WebRTC experiences. A pro-tip is use getUserMedia with audio and video constraints set to true. This forces the permissions pop up to appear. You can kill the feed once the user has accepted the permissions, then ask them what device they want to use, and then fire getUserMedia with the correct deviceId. This is a [nice?] hack as some browsers don't allow you to use enumeratedDevices until after getUserMedia has asked you for the permissions. e.g. Safari...

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice...



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: