WebRTC World Feature Article Free eNews Subscription

October 30, 2012

WebRTC Delivers on the Dream of Plugin-Free Video Chat


WebRTC is an almost magical idea: Browser-based real-time communication baked into the emerging HTML5 standard so users can call each other and video chat without the need of a plugins or third-party software.

If agreed upon and widely adopted, WebRTC (the RTC stands for “real-time communication”) will make it really simple for websites and applications to incorporate voice calling, video chat and P2P file sharing the way it now is a breeze to adjust line spacing on a blog post.

WebRTC still is an API definition in the works, with the W3C mailing list for the technology launched just last year and the official HTML5 specification still being hammered out for at least another few years, if not longer. And there is a competing standard offered up by Microsoft, CU-RTC-Web. But WebRTC is supported by Google, Mozilla and Opera, and the technology in an early form already has made it into the likes of Google Chrome.

“Achievement of Real Time communication has become very simple with the help of our buddy ‘HTML5,’” wrote software developer Sandeep Sunku for CodeProject. “As you know, even the latest Google hang up uses gtalk plugins to achieve video chat. But this Web RTC provides a clean approach to achieve Video chat without much difficulty and without intervention of any third party plugins or modules.”

Sunku demonstrates the possibilities of WebRTC in his article by outlining how it can be used today to build an HTML5-based P2P video chat service. For the demo, he uses the VC++ runtime, Python 2.7.3, Nodejs javascript library, Web Socket server 1.0.3 and Chrome V.21.0.1180.89.

To achieve video chat, the web application goes through three stages: It fetches the video stream from the connected video device of the initiating user, fetches a session description protocol (SDP) by connecting to Google STUN server, and exchanges the SDP with the person being called by using a Web socket server.

“Web RTC provides very good and interesting APIs to fetch the video stream from the connected video device,” wrote Sunku.

Once the stream is received from the device, he explains, the stream is added as a source to the video tag “where you can view the live data of your video device. All the Web RTC javascript APIs are event driven and callbacks based.”

Details like IP address and video format are handled with the SDP, which can be obtained by connecting with the Google STUN server using the webkitPeerConnection API.

“Once the SDP message is received, then the message is sent to the peer using websocket server. This process is known as ‘Signaling’, wrote Sunku. “Signaling is not a part of WebRTC. You need to select or find the way to handshake between peers using some means.”

Sunku selected web socket server for signaling in his example because it is a new HTML5 feature that provides good performance.

“Web socket server is the one who takes care of signaling part,” he noted. “It receives messages from the peers and sends messages to the peers. HTML5 has full support for websocket features and one main advantage of websocket server is, the connection is persistent.”

He added that each day is a revolution in the technology sector, and WebRTC is just that—a revolution in the making when it comes to multimedia and real-time communication.




Edited by Rich Steeves
Get stories like this delivered straight to your inbox. [Free eNews Subscription]




FOLLOW US

Free WebRTC eNewsletter

Sign up now to recieve your free WebRTC eNewsletter for all up to date news and conference details. Its free! what are you waiting for.