ianramzy/decentralized-video-chat

Non-local access not working

unruledboy opened this issue · 2 comments

the default http://localhost:3000 works, but when I change it to access by the actual IP address of the machine, like: http://192.168.0.1:3000/ , start a new chat, and the console gives me the following error:

chat.js:46 Uncaught TypeError: Cannot read property 'getUserMedia' of undefined
    at Object.requestMediaStream (chat.js:46)
    at startUp (chat.js:870)
    at chat.js:941

Chrome and most browsers will block get user media (start webcam) if you are on a non-local http connection. Https is required.

If you want to use a client on another computer/network, make sure you publish your server on an HTTPS connection. You can use a service like ngrok for that.

I managed to use self-signed cert to make it work with public (intranet) access with https: https://stackoverflow.com/questions/21397809/create-a-trusted-self-signed-ssl-cert-for-localhost-for-use-with-express-node