我使用 wkwebview
in xamarin
ios
以显示基于WebApp WebRTC的。我的应用使用WebRTC调用其他应用程序,而我仅使用音频。该应用程序效果很好,但是:
我面临的第一个问题是当应用程序进入后台时,音频播音(iPhone麦克风)被静音,但是传入的音频仍在继续工作。应用不会断开连接,并且网络浏览不会冻结,只有麦克风被静音。
在Safari中打开我的应用程序时,我已经注意到了一些不同的东西:iOS状态栏会改变其颜色,并表明正在使用麦克风,而在我的应用程序(使用WKWebView)中,这不会发生。另外,Safari不会在背景中静音麦克风。
我在WKWebView配置中忘记了一些东西吗?
I´m using WkWebView
in Xamarin
for iOS
to show a webapp WebRTC based. My app uses WebRTC to call other app and I´m using only audio. The app works perfectly, but:
First problem I´m facing is when the app goes to background, outcoming audio (iPhone microphone) is muted, but incoming audio still continues working. App does not disconnect and the webview does not freeze, only microphone is muted.
I have noticed something different when open my app in Safari: the iOS status bar changes its color and shows that microphone is being used, while when in my app (using WkWebView) this not happens. Also, Safari not mutes the microphone in background.
Am I forgetting something in WkWebView config?

发布评论
评论(1)
我们在本地苹果中复制了此问题,并试图在info.plist中添加uibackgroundModes“ audio”和“ voip”,以查看它们是否有所作为。
不幸的是,他们没有。因此,这是一个Apple / Webkit问题。我们在苹果论坛上找到了一个线程,讨论了WKWebView中的WebRTC应用程序:。
另外,还有一个webkit错误报告: 233419 - wkwebview microphone casscect out Backgack not (webkit.org)。因此,请跟进他们。
We reproduced this issue in native Apple and tried to add UIBackgroundModes "audio" and "voip" in info.plist to see if they make a difference.
Unfortunately, they did not. So this is an Apple / WebKit issue. We found a thread on Apple's forum talking about the same issue with a webRTC app in WKWebView: WKWebView getUserMedia microphone … | Apple Developer Forums.
Also, there is a WebKit bug report as well: 233419 – WKWebView microphone access not working in background (webkit.org). So please follow up with them.