2 ms·
This is likely because WebRTC is not "truly" p2p in all instances. It requires a STUN server for identifying the public IP of each peer, and a TURN server for r
by chatmasta 11y ago
This is likely because WebRTC is not "truly" p2p in all instances. It requires a STUN server for identifying the public IP of each peer, and a TURN server for relaying traffic if the clients are unable to establish a direct connection (10-15% of time, IIRC).
Tokbox is probably hosting the STUN/TURN servers for you. If you want to host them yourself, Twilio offers a cloud service for hosting them, or you can just deploy any open source solution to a server you control.
- aoberoi 11y agoTokBox Engineer here. We set out to make a high quality starting point for anyone who wants to include embedded RTC in their next app (or crazy idea). Part of that is solving for the client-side concerns, like an easy toolchain, rich APIs for customizability, and some helpful code that shows the best practices our combined experience with the platform has given us (like above, but stay tuned for more!). But there are definitely more parts, TURN/STUN for network traversal is just the beginning. The OpenTok platform behind this sample app adds dynamic optimizations (like audio fallback), archiving (recording) capabilities, RESTful APIs for eventing and control, etc. Just standing up a STUN/TURN server isn't going to solve the hard problems it takes to make something that can eventually go to production. EDIT: spacing, clarity