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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Are you using WebRTC in production?

32 点作者 subsidd超过 7 年前
I am considering WebRTC for building a social game app which would allow 10 simultaneous connections in a mesh. I would very much love to operate my own signalling server.<p>Does anyone use WebRTC for production all setup manually than using services like tokbox or twilio? How is the performance? What mistakes would you recommend avoiding? and lastly, what tools do you use?<p>Thanks

3 条评论

danieka超过 7 年前
The biggest hurdle for us was learning the ins and outs of the spec.<p>The performance for video and audio is good. I&#x27;d say it is at least as good as Skype for the most part. This is somewhat dependent on which compression you use. H.264 is usually better for mobile devices since they often have hardware accelerated encoding.<p>If you are doing a hybrid app for mobile: Mobile support is spotty both on Android and iOS[1,2]. Android versions before 5.x use an old webview that has no support for WebRTC. This means you have to use the (abandoned) Crosswalk Project or do something with the native library. For iOS the situation is worse. Only the latest Safari 11 has support for WebRTC.<p>If building native app for mobile: You should not have any problem with compatibility. Building WebRTC on iOS is a bit tricky the first time so make sure to check out [5].<p>If you are developing for the browser you should use adapter.js [3].<p>Building a signal server isn&#x27;t that hard. But there are a lot of moving components with offer&#x2F;answer and ICE candidates that needs to work before you get a connection so my tip to start off with some demo code and modify it until you have something more suited to your needs. We don&#x27;t use tokbox or twilio and have built signalling server and infrastructure ourselves.<p>You will most probably need a TURN-server to handle stubborn NAT:ed networks[4]. Maybe not so much for development but it will be needed when you go to prod.<p>Also feel free to email (in profile) me if you have any other questions.<p>[1] <a href="http:&#x2F;&#x2F;caniuse.com&#x2F;#search=WebRTC" rel="nofollow">http:&#x2F;&#x2F;caniuse.com&#x2F;#search=WebRTC</a><p>[2] <a href="http:&#x2F;&#x2F;iswebrtcreadyyet.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;iswebrtcreadyyet.com&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;webrtc&#x2F;adapter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;webrtc&#x2F;adapter</a><p>[4] <a href="https:&#x2F;&#x2F;github.com&#x2F;coturn&#x2F;coturn" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;coturn&#x2F;coturn</a><p>[5] <a href="https:&#x2F;&#x2F;medium.com&#x2F;@atsakiridis&#x2F;building-a-fat-webrtc-framework-on-ios-8610fffb2224#.m2s3p3zh3" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@atsakiridis&#x2F;building-a-fat-webrtc-framew...</a>
评论 #15275422 未加载
indescions_2017超过 7 年前
For your use case (~10 peers) I wouldn&#x27;t get bogged down with network plumbing. Use free solutions such as PeerJS, Xirsys, EasyRTC, etc. You can always open a Twilio account if you have a hit and need to scale.<p>That way you can start building immediately and get onto the hard stuff like managing global game state, handling dropped connections elegantly, network lag and prediction...<p>Good Luck ;)
评论 #15278751 未加载
评论 #15277261 未加载
btown超过 7 年前
<a href="https:&#x2F;&#x2F;www.sococo.com&#x2F;blog&#x2F;webrtc-signaling-here-be-dragons" rel="nofollow">https:&#x2F;&#x2F;www.sococo.com&#x2F;blog&#x2F;webrtc-signaling-here-be-dragons</a> is a good write up of the complexities here. And even with all this work, Sococo is far from perfect - we use it many times a day at my startup, and connections fail to establish all the time. Not an easy task.