why Microphone Not Working in IOS WebView?

245 views Asked by At

We used a WKWebView for holding online classes (chat) using adobe connect. There is a microphone icon to send user voice. In safari when user taps on microphone button, a permission dialog opens for website and after granting permission microphone works properly. but when using WKWebView in application,though user grants microphone permission, it seems having no permission to microphone and shows this alert: "media device not allowed over insecure origin"

How can i fix it? WKWebView config:

webview.configuration.preferences.javaScriptEnabled = true
webview.configuration.preferences.javaScriptCanOpenWindowsAutomatically = true
webview.configuration.allowsInlineMediaPlayback = true
webview.configuration.allowsAirPlayForMediaPlayback = true
1

There are 1 answers

0
aDESH On

It needs a secure request. You are probably pointing it to your localhost. which is an http call not https, hence not secured. Deploy the site some where and have ssl certificate on the domain. You and it will work.