3 Options for running WebRTC on Mobile Devices
Making WebRTC run nicely on mobile is still a challenge. There are different options for doing this and they vary based on specific needs, device type and OS.
Last week I gave a presentation about this topic at the WebRTC 2014 conference in Paris, in preparation for this presentation, I spoke with a few companies to learn how they solved this challenge and presented some of this information in my presentation. For those who missed this event, here is the presentation and a few highlights.
Real-time voice & video on mobile is hard
Before the WebRTC days running real-time voice & video on mobile devices required deep understanding of mobile internals and voice & video processing technologies. There were many things you had to take care of.
- Codecs – SW package of voice & video codecs to be included in the application or HW accelerated video codecs
- HW acceleration – if you went for the HW acceleration option, this required a lot of device/chipset specific work and wasn’t possible on all models
- Device tuning – things like AEC (Acoustic Echo Cancellation), audio gain level and other algorithms require device specific tuning
- Quality – packet loss concealment, FEC (Forward Error Correction), bandwidth management and resolution/frame rate adjustment are complex algorithms that depend on network conditions
- Codec licensing and royalties
No need to further delve into details to conclude that this is a hard task.
Being a high quality, license and royalty free media engine, the WebRTC implementation solves most of these challenges but there are still decision points and challenges companies taking a stab at WebRTC for mobile reported.
Getting WebRTC to run on mobile
There are 3 options for running WebRTC on mobile devices:
Browser
Use the WebRTC enabled browser: Chrome, Firefox and Opera. Works for Androis, not for iOS.
For iOS Ericsson provides the Bowser open source browser although this is not a widely used browser
Native application
A native application means you have WebRTC code compiled into your application. This can be done in a “do it yourself’ approach or by using an SDK.
Do it yourself requires to take the WebRTC implementation from Google or Ericsson and compile it for Android and iOS.
This is the place to mention the demo by Ericsson showing their OpenWebRTC implementation running on iOS. They have managed to use the HW accelerators of iOS for video and demonstrated a high quality 720p at 60 FPS video. This is the first time I see someone use HW acceleration on iOS for video calls.
The SDK approach makes life easier as you take a library someone else has built with WebRTC in it. This would typically come with higher level APIs and a promise to hide version changes and interoperability issues allowing you to focus on building your application.
Most of the SDKs come coupled with an API Platform (TokBox, Temasys, Tropo and many others). This kind of gets you married with a service and is right only for some cases.
There are a few independent SDKs such as the one of Priologic called easyRTC that can optionally come also with a signaling server and a fully customizable collaboration application.
In the SDK category you can include http://build.rtc.io/. This is a solution similar to PhoneGap that allows you to build a mobile application using Web technology – HTML, CSS and JavaScript. It currently supports iOS only but Android is in development.
Hybrid application
The hybrid application makes use of WebView which is a browser component you can include in your application.
Until not long ago WebView didn’t support WebRTC but in the latest Android version it has WebRTC enabled. Given Android device and OS version fragmentation there is a need to do the extra work in order to support it on older Android versions.
In iOS, WebView doesn’t support WebRTC but there are several companies I spoke with that added this support for their own needs.
Conclusion
Running WebRTC on mobile is easier today that it was when WebRTC just came out but it is still a challenge companies struggle with. There are a few possible approaches to solving this challenge and there is no one size fits all option. The option that fits your needs should be carefully selected based on your application and business considerations.
Leave a Reply