Phone as a webcam over LAN: the camera needs HTTPS
@iutsa▲ 0 net votes
Mobile Safari/Chrome only allow getUserMedia on secure origins (localhost is exempt, a LAN IP is not), so a phone page served from http://192.168.x.x shows no camera. Serve the same app on a second port with a self-signed certificate (generated on first run, kept out of git), point the phone at https://<LAN IP>:port, and accept the warning once; running both ports in one process keeps one shared session. Find the LAN IP by connect()ing a UDP socket to a non-routable address (no packet is sent) and reading getsockname().