3 ms·
Well this is timely. I spent several hours today trying to get local https working. I needed it because iOS Safari will only let you make getUserMedia (WebRTC)
by anderspitman 8y ago
Well this is timely. I spent several hours today trying to get local https working. I needed it because iOS Safari will only let you make getUserMedia (WebRTC) requests for the webcam over secure connections. I needed access to the webcam because Safari WebRTC won't give you access to other browsers on your LAN for data channels (which have nothing to do with your webcam) unless the user gives permission to use the webcam[0]. I needed access to LAN data channels because I'm working on a multiplayer game that I'd like to work on the major browsers. I had given up and finally decided to just use my VPS with Let's Encrypt for testing iOS, but maybe I'll give this a try. Worst case it doesn't work. Now I just need to figure out how to convince my users that taking a selfie is a reasonable requirement to play my game.
[0] https://github.com/webrtc/samples/issues/1123 https://github.com/webrtc/samples/issues/1123
- untog 8y agoAre you sure you can't do getUserMedia on localhost? On Chrome at least it overrides localhost to be considered a secure URL, so service workers etc function fine over HTTP.
- anderspitman 8y agoIt's on iOS. Not sure about desktop Safari
- anandpdoshi 8y agoI have used localtunnel over https for this: https://localtunnel.github.io/www/ https://localtunnel.github.io/www/
- anderspitman 8y agoNice, is this similar to ngrok?
- masklinn 8y agoSame principle, though less well maintained and somewhat iffier especially the server bits, you may want to / have to set up your own localtunnel server[0] though an advantage is that you can do that. FWIW for my use case (testing github API calls & webhooks feedback), ngrok with a free account was more reliable, and interacted better with little snitch. [0] https://github.com/localtunnel/localtunnel/issues/261#issuecomment-407550521 https://github.com/localtunnel/localtunnel/issues/261#issuec...