Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does WebRTC work with phonegap/Cordova? [closed]

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.

like image 961
1ManStartup Avatar asked Sep 10 '13 21:09

1ManStartup


2 Answers

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

like image 74
1ManStartup Avatar answered Nov 12 '22 15:11

1ManStartup


As of KitKat (4.4) Android's WebView does not support WebRTC https://developers.google.com/chrome/mobile/docs/webview/overview#does_the_new_webview_have_feature_parity_with_chrome_for_android

The Android Chrome browser supports WebRTC, but the WebView which PhoneGap uses does not. Ironically, this is a case where the pure web solution is more capable than the native/web hybrid.

like image 3
pnewhook Avatar answered Nov 12 '22 15:11

pnewhook