by subsidd on 9/18/17, 8:13 AM with 7 comments
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?
Thanks
by danieka on 9/18/17, 8:59 AM
The performance for video and audio is good. I'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.
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.
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].
If you are developing for the browser you should use adapter.js [3].
Building a signal server isn't that hard. But there are a lot of moving components with offer/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't use tokbox or twilio and have built signalling server and infrastructure ourselves.
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.
Also feel free to email (in profile) me if you have any other questions.
[1] http://caniuse.com/#search=WebRTC
[2] http://iswebrtcreadyyet.com/
[3] https://github.com/webrtc/adapter
[4] https://github.com/coturn/coturn
[5] https://medium.com/@atsakiridis/building-a-fat-webrtc-framew...
by indescions_2017 on 9/18/17, 2:52 PM
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...
Good Luck ;)
by btown on 9/18/17, 12:09 PM