Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

With WebRTC, real-time communications come to the browser

Chris Minnick and Ed Tittel | June 6, 2013
The WebRTC standard aims to make peer-to-peer communication over the Web as easy as picking up a phone. Here's what developers need to know about WebRTC, including how to set it up and what limitations the protocol currently faces.

At Google I/O 2013, Google nonchalantly demonstrated a full video chat client that was written using only 50 or so lines of JavaScript.

For data exchange over peer-to-peer connections, WebRTC includes an RTCDataChannels API. This uses the capabilities of RTCPeerConnection so users can exchange any type of data without having to worry about firewall, proxy, size restrictions, third-party application and other headaches that have plagued the seemingly simple task of transferring a file to another person since the beginning of computing.

RTCDataChannel uses the same API as WebSockets. A simple send method and the OnMessage event handler are all that's required to enable bidirectional, low-latency data connections over RTCPeerConnection. Possible applications include gaming, screen sharing, and even secure large file sharing.

RTCDataChannel can also deliver data in reliable or unreliable modes. If you just need data with the lowest possible latency, and a missed packet is OK once in a while, unreliable mode is the way to go. If the data must be correct (as in file transfer, for example), use reliable mode instead. ShareFest, an open source one-to-many sharing application, uses RTCDataConnection to allow sharing of files of up to around 1 GB without going through a server.

WebRTC Has Amazing Potential-Limitations, Too
With WebRTC, the potential exists to solve the biggest hurdle in Web communications: Making peer-to-peer voice and video (and data sharing, for that matter) as easy as typing messages into forms through the Web today.

Potential WebRTC applications beyond video conferencing include the following:

  • Websites that improve readability based on how far away the reader's head is.
  • Customer support calls that seamlessly integrate video, audio and desktop sharing.
  • Gaming
  • Photo booth or audio recording apps that don't require a second endpoint.

WebRTC is supported and enabled by default in Google Chrome, Chrome for Android and the latest beta of Firefox. It can be used in Internet Explorer with Chrome Frame, a plugin that enables open Web technologies in Internet Explorer. Although Mobile Safari doesn't yet support WebRTC, Ericsson Labs' Bowser browser currently makes WebRTC possible on iOS and Android.

Of course, this is the Web, and nothing is dead easy. Both Microsoft and Apple have huge investments in their own RTC solutions. Microsoft has raised objections to Google's VP8 Codec and hasn't added support for WebRTC to Internet Explorer. Apple's position on WebRTC isn't known, but it's speculated that Apple sees WebRTC as a threat to FaceTime; as a result, Apple may not be in much of a hurry to implement it.

Then there's the problem of how to implement conference calls in a peer-to-peer network. Groups larger than five users present real problems for WebRTC, owing to the complexity of updating and routing data from each peer to every other peer. Just because of the mathematics involved, it quickly becomes overwhelming as the number of parties involved grows, to an order of n factorial.


Previous Page  1  2  3  4  5  Next Page 

Sign up for CIO Asia eNewsletters.