Using the native microphone outside of WKWebView

Hey there,

we’re facing this interesting challenge: WKWebView doesn’t support background mic access, which is really bad for chat apps. However, an idea I had was to utilize the mic natively outside of WKWebView, such that it can keep working in the background. The WKWebView would communicate with the native layer to turn the mic on/off, and we’d then have to interface with mediasoup from the native layer. That is, all incoming audio would still get handled from within WKWebView as we’re doing some pretty complex stuff with spatial audio algorithms, etc. But I think the mic signal itself is a bit more straightforward.

Any thoughts on how to facilitate this dual mediasoup client constellation, one being the use of mediasoup client within WKWebView for incoming audio, while the other being a mic-to-mediasoup layer on the native side to facilitate background mic functionality?

1 Like