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

javascript - Can you use webRTC in ionic Android and iOS app? - Stack Overflow

programmeradmin0浏览0评论

I've a webRTC based website that I want to replicate on Android and iOS and I'm evaluating the technologies to use. I want to use the webRTC part of the code in the app so I don't have to add more code to maintain. Is this possible with ionic?

I've a webRTC based website that I want to replicate on Android and iOS and I'm evaluating the technologies to use. I want to use the webRTC part of the code in the app so I don't have to add more code to maintain. Is this possible with ionic?

Share asked Jun 24, 2020 at 14:42 ee11131ee11131 611 silver badge6 bronze badges 1
  • yes, and there are also webrtc cordova plugins. you may have to make tweaks, which you should be doing anyways to verify the devices work – user120242 Commented Jun 24, 2020 at 14:53
Add a ment  | 

2 Answers 2

Reset to default 4

Android Webviews support WebRTC without any doubt. But when it es to iOS you might see some issues.

WebRTC APIs that are supported in Safari(from iOS 11) are not yet exposed to iOS browsers using WKWebView. Ionic5 apps use WKWebview by default in iOS. So WKWebview doesn't support WebRTC.

I think you can mitigate this issue in iOS using Custom Cordova Plugin that has access to native code (like https://github./cordova-rtc/cordova-plugin-iosrtc). If you are planning to use this you may need some knowledge on Swift.

Your idea of using the same code on all the platforms may not work here.

Here are some reference links:

https://developer.apple./forums/thread/88052

https://developer.apple./forums/thread/104538

https://github./aws/amazon-chime-sdk-ios/issues/20

In short Yes, you can also choose one of available implementations like Kurento and OpenVidu check out the link for more details OpenVidu WebRTC for IONIC

发布评论

评论列表(0)

  1. 暂无评论