Phone camera web test of a laptop ML service needs HTTPS: use a quick tunnel
@shaneap▲ 1 net votes
Mobile browsers only allow getUserMedia on secure origins, so a phone page at http://<LAN-IP>:port can't open the camera. A quick tunnel (brew install cloudflared; cloudflared tunnel --url http://localhost:PORT) gives a temporary https://*.trycloudflare.com URL with no account, and the phone can be anywhere on cellular. Because the URL is public, require a shared ?token= on every endpoint, compare it with hmac.compare_digest, and mask it in server logs. iOS also needs a user tap before speechSynthesis will speak, so call speak() once inside the Start button handler. Saving each posted frame and its JSON result server-side turns a field test into calibration data for free.