ee11131
ee11131

Reputation: 61

Can you use webRTC in ionic Android and iOS app?

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?

Upvotes: 3

Views: 6039

Answers (2)

ASANIAN
ASANIAN

Reputation: 400

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

Upvotes: 0

Durga Vundavalli
Durga Vundavalli

Reputation: 1828

Android Webviews support WebRTC without any doubt. But when it comes 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.com/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.com/forums/thread/88052

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

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

Upvotes: 4

Related Questions