I know that WebRTC
was designed for browsers, but is it possible to use WebRTC libraries on mobile applications directly?
Thanks!
I know that WebRTC
was designed for browsers, but is it possible to use WebRTC libraries on mobile applications directly?
Thanks!
Not yet, it is only supported in Firefox's nightly and Chrome, both desktop versions. See http://www.webrtc.org
Edit: sorry I thought you were asking for mobile browsers. For native apps it looks like a definite no :(
But there seems some mobile browser support http://www.morbo.org/2013/04/webrtc-support-on-android.html
For iOS, just add this to your CocoaPods Podfile
Check this for which revisions are available. Revision 6802.X reflects to this from the actual
WebRTC
code base.Android will be added to maven central very soon, I'll make an edit to this when happens.
If you want to manually build WebRTC check out github.com/pristineio/webrtc-build-scripts which also includes a step by step guide for both platforms
My team has done quite a bit of work in this area. If you are looking for a Cordova plugin we've been playing with an open source project called PhoneRTC. We have it running on iOS but it's a bit unreliable and the aspect ratio of the video window is fixed in a way that looks unnatural on most devices but it does work.
We've also created an Android demo using libjingle. Libjingle is now part of the WebRTC project and code base. This link is probably out of date now but points to instructions that worked for us at the time.
We (disclaimer: I work there) have built a set of libraries for doing this @ Frozen Mountain, in IceLink. Full WebRTC implementation for iOS, Android, .NET, etc.
Quite late to answer.. But i just made a framework for adding WebRTC easily in iOS Project. You won't need to build WebRTC framework from the library. This framework will give you built in framework along with a wrapper for easy addition of webRTC to your app. https://github.com/Ankit-Aggarwal/SwiftyWebRTC
As of May 14 here is an android project using
WebRTC
that works nicely.I translated that entire android project to
Objective-C
for iOS and got WebRTC working in iOS too but I'm having trouble on iPhone 4 and 4s. Just works in iPhone 5 and 5s.I think the problem is the performance. When I make a videocall with the webrtc libraries it takes about 140% of the CPU on an iPhone 5, which I guess that's a lot of resources and the iPhone 4s can't handle it.
Edited
After struggling with the video connection (always disconnected after 10 seconds) I finally got WebRTC working on iPhone 4s, all you have to do is set the right constraints when creating the local videoSource capturing object:
Note that this sends a very small video, but it works!