using webrtc code on my cordova app
Asked Answered
C

1

5

Im trying to use webRTC API such as getUserMedia and RTCPeerConnection for my app which is built with the cordova framework.

I am wondering if its possible for webRTC to work on both Android and iOS since my video chat app is a hybrid app (js and html) which is supposed to manage the entire p2p video chat by itself, unlike pc versions which require a web browser for the webRTC communication.

Coussoule answered 3/3, 2018 at 18:3 Comment(0)
D
8

Yes, It is possible to get them to work. Keep in mind, the architecture of cordova application is reliant on a Web View rendering of your application. That web view will need to provide the WebRTC APIs to consume in JavaScript. This thread suggest the web view in iOS 11 does not support it. In fact, it is pretty new to Safari all together. This documentation says that the latest versions of Android Web Views do have support. WebRTC is a collection of technologies that enables RTC, and there are native libraries for accomplishing this. I have seen a couple of plugins for Cordova that enable access to native code so you are not as reliant on the Web View.

cordova-plugin-iosrtc

phonertc

Good luck!

Decolorize answered 4/3, 2018 at 3:59 Comment(1)
Your welcome! It is an awesome technology. This article may be of some use as well: webrtchacks.com/webrtc-hybrid-applicationsDecolorize

© 2022 - 2024 — McMap. All rights reserved.