最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - using webrtc code on my cordova app - Stack Overflow

programmeradmin7浏览0评论

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 munication.

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 munication.

Share Improve this question asked Mar 3, 2018 at 18:03 Niko VincentNiko Vincent 531 silver badge5 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 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 acplishing 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!

发布评论

评论列表(0)

  1. 暂无评论