4 ms·
Im doing exactly this, but will use it with a raspberrypi with a 7 inch touch screen as my doorbell. Someone hits the link on the screen, it hits the server, se
by emehrkay 5y ago
Im doing exactly this, but will use it with a raspberrypi with a 7 inch touch screen as my doorbell. Someone hits the link on the screen, it hits the server, server texts me a link to join the video session and thats it really. I got the core code going (I used a simple tornado [python] implementation as it has web sockets built in)
This is the version of the js code that I got going (I couldn't reason about straight inline scripting, I had to make unnecessary classes. you dont need them) https://gist.github.com/emehrkay/1ea9a87a91e00b27843d9b71a3cce96c https://gist.github.com/emehrkay/1ea9a87a91e00b27843d9b71a3c...
You also need to tell nginx to serve the wss connection with http 1.1 or the handshakes fail
```
location /websocket/path {
proxy_pass http://whateverSiteDotCom; http://whateverSiteDotCom;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Origin '';
}
```
- deneb150 5y agoLooks nice, here's the final working JS file from this blog post's example, no classes: https://github.com/m-butterfield/mattbutterfield.com/blob/882fc4b7aa3fe7f59a0d8acf0623d20e6e48c87a/app/controllers/js/video.js https://github.com/m-butterfield/mattbutterfield.com/blob/88... A bit dense, and could use some error handling...but it actually seems to work fine!
- emehrkay 5y agoThis looks pretty straight-forward and makes me wonder if im doing too much work creating and juggling two RTCPeerConnection connections. I will try your approach
- emehrkay 5y agoThis code works fine in iOS safari (and desktop chrome, Firefox, and safari). I've seen a few comments on how mobile safari has pitfalls or is the new IE, but there isnt any specific code there for safari. it all just works
- sscarduzio 5y agoI really like the video doorbell project, can you make it OSS and put it on a Github repo?
- emehrkay 5y agoYes. I will show a show hn post when I get it all running