TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Building video chat into my personal website using WebRTC, WebSockets, and Go

245 pointsby deneb150about 4 years ago

11 comments

emehrkayabout 4 years 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)<p>This is the version of the js code that I got going (I couldn&#x27;t reason about straight inline scripting, I had to make unnecessary classes. you dont need them) <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;emehrkay&#x2F;1ea9a87a91e00b27843d9b71a3cce96c" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;emehrkay&#x2F;1ea9a87a91e00b27843d9b71a3c...</a><p>You also need to tell nginx to serve the wss connection with http 1.1 or the handshakes fail<p>``` location &#x2F;websocket&#x2F;path { proxy_pass <a href="http:&#x2F;&#x2F;whateverSiteDotCom;" rel="nofollow">http:&#x2F;&#x2F;whateverSiteDotCom;</a> proxy_http_version 1.1; proxy_set_header Connection &quot;upgrade&quot;; proxy_set_header Upgrade $http_upgrade; proxy_set_header Origin &#x27;&#x27;; } ```
评论 #27032072 未加载
评论 #27033682 未加载
评论 #27035824 未加载
tschellenbachabout 4 years ago
I feel like part of the reason why software engineering projects are hard to estimate is this. So you want to add video chat..<p>- this blogpost: 100 loc - pion (open source): 100k loc? - dolby.io&#x2F; agora: I&#x27;m guessing &gt;1m loc - zoom.... even more?
评论 #27031305 未加载
评论 #27034767 未加载
评论 #27031098 未加载
评论 #27036453 未加载
评论 #27031584 未加载
评论 #27030804 未加载
ejb503about 4 years ago
Not quite so easy as the blog makes out... didn&#x27;t see any mention of turn and stun servers, and multi-peer adds layers of complexity...<p>To stably build a negotiation system you&#x27;ll probably need an infrastructure of websockets and some kind of nosql db to handle identity and other quirks around negotiation...<p>Example... how do you handle refresh from a new tab or after the connection has dropped... some kind of device signature is probably needed too!!<p>(We&#x27;ve just spent a year building this for ecommerce @ <a href="https:&#x2F;&#x2F;yown.it" rel="nofollow">https:&#x2F;&#x2F;yown.it</a>)<p>BIG thumbs up for the interest in WebRTC though enormous potential...
评论 #27030851 未加载
regularemployeeabout 4 years ago
I tried this myself too and when I try p2p with 4 people, out of 10 tests about 50% of the time I won&#x27;t be able to see all 4 people or someone wouldn&#x27;t be able to see all 4 people.<p>It was really hard to make p2p work and debugging the ice connections was even harder.
评论 #27030882 未加载
评论 #27031393 未加载
评论 #27031440 未加载
评论 #27030770 未加载
评论 #27030470 未加载
评论 #27031782 未加载
Naacabout 4 years ago
...and GCP, and pub&#x2F;sub&#x2F; and...<p>So a little click baity title. If the backend wasn&#x27;t distributed the title would be a little more apt.
neophyt3about 4 years ago
no mention of turn servers, also p2p does not scale well since its mesh network... good article, but this wont make it to production alone
SilurianWenlockabout 4 years ago
I cant see this video feature on his personal website?
cblconfederateabout 4 years ago
i wonder if webrtc was built to be intentionally complex or if a better standard would make adoption easier, perhaps in conjunction with a standard server (like we have httpd for html)
jqpabc123about 4 years ago
Anyone have something similar for screen sharing?
评论 #27031464 未加载
评论 #27032172 未加载
评论 #27031174 未加载
评论 #27033153 未加载
mfbx9da4about 4 years ago
Nice, did you setup a turn server?
mro_nameabout 4 years ago
nice and concise, chapeau.