VoIP Fundamentals | OnSIP

Chrome and WebRTC

Written by OnSIP | April 29, 2014 at 4:58 PM

45.22% of all internet users employ Google Chrome, which makes it the most used browser in the world.1 This figure is over twice as much as Internet Explorer’s 21.43% market share (a number that has dropped nearly 10% in the past year), and more than Firefox, Safari, and Opera’s combined share (29.8%). WebRTC and Chrome have become inseparable since the Chrome team released its WebRTC API in 2011. But besides its closeness, WebRTC is also beholden to Chrome because the browser represents WebRTC’s largest adoption opportunity.

A Brief History of Chrome and WebRTC

In 2011, Google put its company’s structure, engineering knowhow, and product ubiquity together to make WebRTC on Chrome the first true in-browser solution to real-time communications (RTC). Peer to peer communication through an internet browser, without downloads or plugins, had always been a dream for online developers since the inception of the internet. But until recently, RTC had simply been known as one of those things the internet should be able to do.

The sudden renaissance of browser-based RTC in 2011 was spurred by a series of mergers. Google acquired On2, the creators of the VP8 video codec, and Global IP solutions, a company that was already licensing low level components for RTC. With these new resources, the WebRTC Chrome project was born at Google. Google made the project open source, and its developers ultimately settled on G.711, OPUS, and VP8 as the required codecs for the WebRTC API. The first implementation of WebRTC was built by Ericsson in 2011. In November 2012, Chrome 23 became the first large scale browser to offer embedded WebRTC functionality right out of the box.

Chrome and WebRTC: How It Works

The basic implementation of WebRTC for Chrome is very similar to Firefox’s. Three JavaScript APIs - getUserMedia, RTCPeerConnection, and RTCDataChannel - form the core architecture of Chrome’s WebRTC feature. Media is captured and synchronized by getUserMedia. It is then transmitted in an offer/answer model via a signaling mechanism through RTCPeerConnection. Arbitrary data (text chat, file sharing, etc.) is enabled with RTCDataChannel. Taken together, these APIs are capable of transmitting almost any conceivable form of real-time data.

In terms of broader considerations, the most crucial component for WebRTC Chrome developers besides the Chrome browser itself is the server-side signaling mechanism that allows for peers to communicate with each other. This mechanism is not included with the Chrome browser. The solution often comes in the form of a preexisting signaling platform, such as OnSIP's. Our mature, scalable SIP signaling platform is primed to traverse the complexities of NAT and firewall based impediments that obstruct clear communication between peers.

What Makes WebRTC for Chrome Different?

The overarching concept of WebRTC on Chrome and Firefox are similar in the sense that both browsers use the same three APIs. But WebRTC on Chrome has a few capabilities that Firefox’s version does not. The G.711, Opus, and VP8 codecs are natively supported by both browsers, but the iLBC, iSAC, and G.722 codecs are only natively supported by Chrome. Developers utilizing Google’s WebRTC API will have access to a broader array of voice codecs, which may be of interest to those who are integrating their WebRTC applications with VoIP networks.

The issue of interoperability between Chrome and Firefox browsers is solved via the signaling mechanism at the start of a WebRTC call. The offer/answer method is used to compare the getUserMedia specifications of each caller, and then a shared codec is implemented to initiate the connection. If a Chrome browser offers an iLBC codec to a Firefox browser, the signaling mechanism will force Chrome to adopt either a G.711 or an Opus codec for the sake of compatibility. Signaling platforms, such as OnSIP's, automatically negotiate these matters of browser interoperability during the offer/answer phase of the call.

WebRTC and Chrome: A Look Toward the Future

Skeptics will note that Chrome’s support of WebRTC does not necessarily mean that 45.22% of Internet users are WebRTC-enabled. As of now, only the latest versions of Chrome support WebRTC. The broader picture, however, is that WebRTC has become the de facto RTC standard of choice for the world’s most popular internet browser. As more people update to newer versions of Chrome with WebRTC, the mathematical abstraction of 45.22% will become a more massive, tangible user base. And this transition is already well underway: over 1 billion devices are currently WebRTC-enabled2, a majority of which utilize the Chrome browser.

1. “Global Browser Stats” - StatCounter 

2. “WebRTC: Plugin-free realtime communication” - Justin Uberti - WebRTC Tech Lead, Google