MediaStream for Video and Audio

I have an Ionic/Capacitor App that uses WebRTC to do calls, the everything works fine on web as PWA, but as soon as I start going for iOS the App crashes whenever I request mediaStreams. The error is around Secure Context since capacitor Apps use localhost (which is considered ‘unsecure’), and using https:// on the Ionic config file will lead to an App that required network to do a first load.
Can anyone help me on how I can get around this issue and have it solved.

Using custom schemes is considered secure on WKWebView (that Capacitor uses), at least from iOS 14.6 or so and newer.

You need to add camera and/or microphone usage descriptions to your Info.plist

1 Like

Let me try that immediately, because I didn’t have those Info.plist entries.

This finally worked, thank you a lot for this help.