WebRTC Real-time Video Chat

webrtc

Hello Viewers!

In our previous blog, we had discussed about powerful Firebase API and its role to create real-time chat & event streaming apps .

In this blog, we are discussing about the use of all-new WebRTC technology to create real-time and free video chat.

Since last more than a decade, in web or mobile communication the most meaningful breakthrough comes with WebRTC that opens the door for the new waves of data web applications, voice and video chat. This all new WebRTC technology can be built in to the most browsers and has a potential to revolutionize the way of communication. It is a HTML 5-based technology and promise to replace the third-party plugins requirement like in Skype or Google Hangouts that offers video and voice chat facilities in your browser. Moreover, with WebRTC you don’t require to create an account for the most implementations of this technology. You can simply set up a web page supported with WebRTC real-time video chat. Then, you just have to share a web page link to get hassle free chatting running in no time!

WebRTC Components

WebRTC includes the fundamental building blocks for high-quality communications such as network, audio/video components used in video chat apps. These components, when implemented in a browser, can be retrieved through a JavaScript API to enable developers easily implement their own RTC web app.

WebRTC contains three APIs

1. GetUserMedia (camera and microphone access)
2. PeerConnection (sending and receiving media)
3. DataChannels (sending non-media directly within browsers)

Key Benefits Of WebRTC

1 Better video quality Noticeably it is better than the Flash.
2 Faster connection (up to 6 times) HTML5 standard, uses JavaScript WebSockets, Improved session connection time and enhances delivery of other OpenTok events.
3 Minimizes audio/video latency Significant improves latency enabling more natural and effortless chatting.
4 No more Flash No longer require Flash for browser-based RTC.
5 Native HTML5 elements You can customize the feel and look to work with video on a web page with the new video tag in HTML5.

So, If you are willing to give WebRTC a try, here we have mentioned how it started:

Select Browser Support

The most of the currently used browsers of desktop already support WebRTC i.e. Firefox, Chrome, and Opera except Microsoft’s Internet Explorer and Apple’s Safari.

However, Microsoft recently announced  to launch ‘Skype for Web project’ supported with WebRTC.

Also, if you are looking for browser WebRTC support on your mobile then you can try Firefox, Chrome, and Opera on Android and Bowser on iOS.

Begin Chatting

After selecting your preferred browser you may begin your chat using WebRTC. Some of the renowned sites that support WebRTC are talky.io, apprtc and appear.in. All these sites with the support of WebRTC are usually convenient to use and don’t require any extraordinary technical skills.

Overview WebRTC Real Time Video Chat

Here, we are discussing an overview for the actual behind the scenes  WebRTC role in real time video chat without discussing about various codes involved in it.

You will get a better Idea with following step wise time-line of what actually happens:

Stop adding ICE (Interactive Connectivity Establishment), once the remote media starts streaming. For many network topologies, as a temporary solution this might result in suboptimal media routing. Use it only until Chrome’s ICE support is fixed.

Issues And Troubleshoot

You might expect a number of issues and problems while trying to build WebRTC real-time video chat. WebRTC is still new and evolving very quickly so you may go through a number of issues every day.

We are discussing some of problems and troubleshoot as mentioned below:

Google Chrome PeerConnection

During your work on Chrome, for its new PeerConnection capability, a strict order of operation may be discovered for it to work; like:

  • Before sending SIP (offer/answer SDP), peers must be present with local streaming video.

  • Until-unless the peer generates the ‘Answer SDP’, Do not add ICE candidate for ‘Answerer’.

  • Stop adding ICE candidates, once remote media streaming starts.

  • Until-unless you get the ‘Offer SDP’, for answerer never create peer connect.

You can do it by handling issues and the connection in order as described above. It may be crucial to make the connection work flawlessly.

Added latency with lag

There can be added latency due to lag and limitations of surfing the net while streaming to a mobile device.

Troubleshoot: Reduce the resolution of streamed video via a hash tag at the URL end.

For a low resolution stream video, this URL can contain '#res=low' as an option & '#res=hd' as an optional URL parameter for HiDefinition streaming video. You can also use other configurable properties such as frames per second for this purpose.

The WebRTC demo Recording

You may be dabbled with WebRTC demo video recording. While using the new JavaScript type arrays during video recording, you may discovered that video and audio only can be recorded separately.
Troubleshoot: For recording, create two instances, one for the video and one for the audio, that will utilize the new java-script data types and thereby record both streams simultaneously.

Conclusion

WebRTC allows you to create a real-time free video chat in your preferred browsers without any need for the plugins, downloads, or installs that otherwise slowed end-user acceptance of proprietary video technologies. So we can say, WebRTC has the potential to reach the billions of existing Internet-connected mobile devices, including PCs and Mac with an installed browser.

We hope, you will find it exciting to use WebRTC in your web or mobile browser for a real time free video chat.
Please share your experience and views on Reaching us.

If you want to share any suggestions, then please give us a shout in our comment section:

Ellipsis-1s-200px