TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to create a video call application with WebRTC

441 点作者 xueyongg将近 5 年前

25 条评论

bkanber将近 5 年前
I also decided to learn WebRTC and built a video chat app project: <a href="https:&#x2F;&#x2F;zonko.chat" rel="nofollow">https:&#x2F;&#x2F;zonko.chat</a><p>The last time I did any p2p networking was back in 2002 or something when you still had to do it all manually. We used all sorts of fun tricks like NAT hole punching, and using little script endpoints to capture and forward along port and public IP address information.<p>It was fun to see that all of this has since been formalized under the &quot;ICE framework&quot;. I was surprised to see that the STUN spec is only 12 years old now, despite the techniques involved being used for at least 20 years, probably more like 30+.<p>So if anyone who&#x27;s new to this whole p2p world feels that WebRTC and the ICE framework is confusing or onerous, I would point out that just a short while ago these were basically just a handful of heuristic techniques developed through trial and error over the years. It&#x27;s really much easier nowadays! zonko.chat only took me 12 or so hours to build (and seems to be well-supported by chrome and ff, even mobile).<p>Edit: Upon reflection, I don&#x27;t even remember how I learned about some of them. The concept of TURN was probably one that I, and many thousands of others, invented from scratch due to necessity (failed to punch the hole? fall back to this custom relay I wrote in perl). STUN was an easy one to figure out yourself, too. I don&#x27;t remember how I learned about hole punching though. Probably a forum or a book. Or possibly just an experiment (&quot;what if the two connections touch somewhere in the internet at the same time... hey wait, it worked?&quot;) What&#x27;s interesting to me is that the core &quot;ICE&quot; concepts (hole punching, STUN, TURN) are still pretty simple even in their mature, formalized, scientific form. But the concept of &quot;SIP&quot; is <i>much</i> more sophisticated today than it was back then.
评论 #23524193 未加载
评论 #23523929 未加载
figers将近 5 年前
WebRTC seems easy when you&#x27;re creating a proof of concept with-in your own network, once you get into complex situations behind firewalls across the internet it&#x27;s a whole different story.<p>The article mentioned &quot;This section we will just touch and go about when do you need a TURN server. It is not needed in all situations but a component needed if you have to deal with slightly less straightway use cases.&quot; a TURN server is a must in the real world...
评论 #23523285 未加载
评论 #23524175 未加载
评论 #23525597 未加载
评论 #23523237 未加载
评论 #23524850 未加载
评论 #23525594 未加载
评论 #23523108 未加载
评论 #23524508 未加载
zumachase将近 5 年前
The issue with webrtc is once you step out of the side-project domain, you have to confront the endless implementation differences between browsers, whether it&#x27;s undocumented SDP behavior, different codecs, non-conformant behavior for low level calls, etc.<p>We&#x27;ve built a push-to-talk walkie talkie system called Squawk[0] which holds long lived webrtc connections in the background throughout the day. We use simplepeer[1] as the base to help bootstrap some of the browser shimming, but it&#x27;s not perfect. So ultimately we&#x27;ve had to build all sorts of checks into our protocols like an audio keepalive where we send periodic frames (20ms) of silence down the media channel, and verify that we received some additional header bytes on the remote end, because otherwise webrtc would let the connections rot and you wouldn&#x27;t know until you needed them which in a push-to-talk situation is too late.<p>[0] <a href="https:&#x2F;&#x2F;www.squawk.to" rel="nofollow">https:&#x2F;&#x2F;www.squawk.to</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;simple-peer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;simple-peer</a>
评论 #23535085 未加载
评论 #23529432 未加载
hardwaresofton将近 5 年前
For those interested in seeing how WebRTC can really scale check out some of the media servers&#x2F;SFU (Selective Forwarding Units)s that are out there:<p>- janus[0][1]<p>- mediasoup[2][3]<p>- Medoze[4][5]<p>It&#x27;s never been easier to start your own video streaming platform.<p>[0]: <a href="https:&#x2F;&#x2F;janus.conf.meetecho.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;janus.conf.meetecho.com&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=zxRwELmyWU0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=zxRwELmyWU0</a><p>[2]: <a href="https:&#x2F;&#x2F;mediasoup.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mediasoup.org&#x2F;</a><p>[3]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=_GhdFOZTWTw" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=_GhdFOZTWTw</a><p>[4]: <a href="https:&#x2F;&#x2F;github.com&#x2F;medooze&#x2F;media-server" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;medooze&#x2F;media-server</a><p>[5]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=u8ymYTdA0ko" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=u8ymYTdA0ko</a>
评论 #23540136 未加载
评论 #23524214 未加载
评论 #23523911 未加载
评论 #23525868 未加载
davidsawyer将近 5 年前
A 19-year-old[0] built a video call app[1] with WebRTC and open-sourced[2] it.<p>Here&#x27;s a podcast interview[3] about how he did it.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;ianramzy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ianramzy</a><p>[1]: <a href="https:&#x2F;&#x2F;zipcall.io" rel="nofollow">https:&#x2F;&#x2F;zipcall.io</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;ianramzy&#x2F;decentralized-video-chat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ianramzy&#x2F;decentralized-video-chat</a><p>[3]: <a href="https:&#x2F;&#x2F;syntax.fm&#x2F;show&#x2F;256&#x2F;webrtc-and-peer-to-peer-video-calling-with-ian-ramzy" rel="nofollow">https:&#x2F;&#x2F;syntax.fm&#x2F;show&#x2F;256&#x2F;webrtc-and-peer-to-peer-video-cal...</a>
评论 #23527710 未加载
jpgvm将近 5 年前
IPv6 is becoming increasingly common here in Asia (I&#x27;m based in Thailand but travel a lot around Asia). For context I have used 3 different ISPs here and all have dual stack, both my cellular connections have also been dual stack.<p>This has meant NAT is less of an issue for native IPv6 endpoints, including P2P.<p>Hopefully when IPv6 is finally widespread in US&#x2F;Europe we will see stuff taking more advantage of this fact.
评论 #23526889 未加载
flyGuyOnTheSly将近 5 年前
I&#x27;m eager to create a higher quality video broadcasting (not web meeting, one way only) app for some local yoga studios I help out with and am hoping this article gives me a push in the right direction.<p>The audio quality on zoom is just terrible no matter if you disable DSP or not.<p>So many yoga classes require high quality music.<p>It&#x27;s frustrating that chaturbate provides top notch video and audio quality for free essentially, while paying $20&#x2F;mo for zoom gives you what looks like 380p video quality and audio quality I have yet to find a poor comparison for...<p>Does anyone know how one could emulate what chaturbate does?<p>Any good articles outlining how they do what they do?<p>Ideally, the teacher would just plop their phone down in front of them, hit broadcast, and a few seconds of buffering later 1080p video and quality audio would be visible through a browser.<p>Why is that so tough to do??? I haven&#x27;t been able to find a single article that simplifies or distills it at all.
评论 #23524985 未加载
评论 #23523298 未加载
评论 #23524275 未加载
评论 #23524537 未加载
评论 #23523675 未加载
评论 #23524739 未加载
评论 #23523446 未加载
评论 #23523532 未加载
评论 #23525147 未加载
talkingtab将近 5 年前
I&#x27;ve been looking into webrtc and used the &quot;webrtc samples&quot; which are good in many ways. It is fairly easy to get something up and running, but I found several areas that were difficult.<p>* debugging. One users sound just doesn&#x27;t work while it works perfectly for me with different machines. I am clueless as to how to debug it.<p>* ice. while it works, I had a hard time understanding, tracking and debugging what was going on.<p>* closing and restarting connections<p>* multiple clients in one room?<p>* echo cancellation. This was frustrating for users.<p>* Turn. Is there a tool or way to know which clients need a turn server? Are using a turn server?<p>I ended up guessing that getting it to be a product would actually be fairly time consuming
评论 #23523470 未加载
评论 #23524225 未加载
评论 #23526399 未加载
评论 #23523318 未加载
perenzo将近 5 年前
<a href="https:&#x2F;&#x2F;brie.fi&#x2F;ng" rel="nofollow">https:&#x2F;&#x2F;brie.fi&#x2F;ng</a> - a modern pure open source WebRTC implementation. It can even blur peoples background for visual privacy. Sources at <a href="https:&#x2F;&#x2F;github.com&#x2F;holtwick&#x2F;briefing&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;holtwick&#x2F;briefing&#x2F;</a>
评论 #23524693 未加载
xueyongg将近 5 年前
Took some time over the weeks to play and figure out WebRTC. Made a simple app out of it. Do check it out!
评论 #23522977 未加载
shyamady将近 5 年前
Twilio costs but not a bad idea. I created Remotehour(<a href="https:&#x2F;&#x2F;remotehour.com" rel="nofollow">https:&#x2F;&#x2F;remotehour.com</a>) which allows you to have an &#x27;open-door&#x27; policy video call easily. It works with Twilo :)
whoatethedonut将近 5 年前
This reminds me of Icecomm[0] from a few years back. Unfortunately, it didn&#x27;t stick around for too long. It was pretty easy to use, as well, and a lot of people here ended up in a video chat together[1]. LOL!<p>[0]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8952880" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8952880</a><p>[1]: <a href="https:&#x2F;&#x2F;medium.com&#x2F;@icecomm&#x2F;how-launching-icecomm-on-hacker-news-created-the-most-curious-chat-roulette-ever-731fb22dc072" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@icecomm&#x2F;how-launching-icecomm-on-hacker-...</a>
panpanna将近 5 年前
Does anyone have a better tutorial on webrtc?<p>I didn&#x27;t find the article particularly good.
评论 #23525416 未加载
mcjiggerlog将近 5 年前
I have some experience in this from developing <a href="https:&#x2F;&#x2F;p2p.chat" rel="nofollow">https:&#x2F;&#x2F;p2p.chat</a> a while back.<p>As others have mentioned, building a simple project is fairly simple. The difficulty comes when you want to scale to more than ~4 users without the app becoming unusable. Adjusting audio&#x2F;video constraints to ensure that you get optimal media streams is quite difficult, also. Nevermind dynamically tweaking them!
rergaerg将近 5 年前
In real life, the STUN server rarely works, and thus, the myth of this peer to peer utopia was never realised, and why webrtc did not receive any attention
ryanrolds将近 5 年前
A small group of friends and I are working on a virtual karaoke club using WebRTC and Go, <a href="https:&#x2F;&#x2F;github.com&#x2F;ryanrolds&#x2F;club" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ryanrolds&#x2F;club</a>. 100% agree with the WebRTC being easy to create proof-of-concepts, but there are a lot of edge cases and browsers differences that have to be worked through.
评论 #23527940 未加载
xueyongg将近 5 年前
I really learnt so so much from the entire thread discussion here today! WebRTC I&#x27;ve gathered is oftentimes easy to create, but the real challenge is in the scalability. From the way it seems, scalability is only possible with the forwarding architecture with the use of the Selective Forwarding Unit or of like.<p>I always wonder if there is a way to think outside of this &#x27;box&#x27;.
cf将近 5 年前
One thing I&#x27;ve wanted to make is something like gather.town where I can remix the audio and video so that different users sounded louder or quieter. But, I never figured out where in the WebRTC API that is done. It seems like I need to set up my own SFU and put the necessary logic over there.
评论 #23524232 未加载
ronlobo将近 5 年前
Pretty cool!<p>Check out<p><a href="https:&#x2F;&#x2F;github.com&#x2F;meething&#x2F;meething" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;meething&#x2F;meething</a><p>dWebRTC Video Meetings MESH&#x2F;SFU hybrid using GunDB, MediaSoup and Beyond!<p>This seems to be one of the most promising projects in the WebRTC space with support from Mozilla Builders.
buboard将近 5 年前
sadly webrtc p2p does not scale. Sadly current HTML-based solutions for media servers are slow and highly CPU intensive. Even more sadly, adobe flash has solved the problem of multi video chat decades ago, but we have decided to deprecate without alternative
julius_set将近 5 年前
This article is a strange one. They mention WhatsApp and some other mobile products but then proceed to frame everything into the context of a browser.<p>WebRTC works without a browser too FYI
kbumsik将近 5 年前
Can it be used as an UDP alternative for server-to-client communication, not browser-to-browser? If so, are there any projects implementing it?
gandutraveler将近 5 年前
Does webrtc also work on native Android iOS apps ?
评论 #23526957 未加载
remotists将近 5 年前
Most ISPs here in Asia have dual stacks.
spicyramen将近 5 年前
It&#x27;s interesting the raise again for unified communications. All this technology specifically WebRTC is being around for few years now. The Innovation is minimum, why? Most do the problems are solved. When a technology is mature most of the focus is on security or applying other technologies to improve it such as Machine Learning. In the case of VoIP and Video apps, is very mature since the inception of H323, SIP, SCCP, RTP, sRTP, most recently JS and WebRTC.