On this page

Technology

WebRTC

WebRTC is an open standard for real-time audio, video and data directly between browsers and apps. I used it to connect two players in an iOS fighting game, and it carries real-time voice and video in AI interfaces

Type
Technology
Official site
webrtc.org
In my work
Services 3
Published

What is WebRTC and when do I use it?

When two devices need to talk with the lowest possible delay, a server in the middle is in the way. WebRTC connects them directly, and a server only helps them find each other

Key facts

Type
Open standard for real-time communication between browsers and apps ·
Supported by
Apple, Google, Microsoft and Mozilla, among others ·

How I use WebRTC

  • YapSlap. An iOS fighting game controlled by facial expressions. Two players connect over WebRTC, so every move reaches the other phone without a detour through a game server.
  • Real-time AI interfaces. Voice and video that react while the user is still speaking. See AI development.
  • Prototypes that need a call inside. Video and audio between users as one feature of a product, not a separate app. See MVP development.

When I choose WebRTC and its limits

WebRTC is the right choice for calls, live video, screen sharing and fast data between two or a few devices. The delay is lower than through any server.

It is more work than it looks. Devices need a signalling server to find each other and a relay server for networks that block direct connections, and large group calls need a media server. For many players and one shared game state, a server with Socket.IO is simpler and fairer.

Used together with

Sources

  1. WebRTC API — MDN Web Docs ·
  2. WebRTC — WebRTC project ·

Contact

Have an idea? Let’s make it work