Does WebRTC work with phonegap/Cordova?

1ManStartup picture 1ManStartup · Sep 10, 2013 · Viewed 8.4k times · Source

Edit: Rephrased My Question and Title

So if you can tell from the title I am using Phonegap/Cordova and trying to add WebRTC to an HTML/JS/CSS app. Perfectly works on the desktop browser, but not on mobile.

The reason I ask this question is because I have seen video chat apps on mobile(oovoo/skype), but no chat apps in the browser. Although I am aware webrtc doesnt work on IOS, but does work on newer versions of Chrome.

But is it possible to run WebRTC if I wrap my app in a Cordova/Phonegap webview and distribute it as an app? Because if I can access native components like the camera or accelorometer with PhoneGap why can I not use video chat with an HTML/JS/CSS app?

Has anyone tried this?

TIA.

Answer

1ManStartup picture 1ManStartup · Jan 17, 2014

It may work on mobile devices, but not not all, and not with Phonegap(based on my exp). According to CanIUse.com, WebRtc is not supported for iOS and IE. But for Firefox and Android, and even then may need chrome canary or nightly builds on some devices.

Source: http://caniuse.com/#search=webrtc

A native app would be the way to go, so i've actually switched most mobile apps from PhoneGap to CoccoonJS which is free and gives me a native app with my html/javascript code.

I was able to get it to run on Android with multiple video feeds and it supports websockets for server signaling.

Source: https://www.ludei.com/cocoonjs/

The android app called, Azar claims to use WebRtc, so it looks like it should run natively:

Source: http://www.app-trailer.com/app/random-video-chat-azar.html