Symptoms
- The app's audio sources stop or mute when destroying a webview or playing audio in a webview on Meta Quest.
- Your application is using 3D WebView for Android with Gecko Engine.
Cause
The Meta Quest's audio subsystem has a bug that causes the app's audio sources to mute unexpectedly when the Gecko browser engine closes a session or plays and then stops audio. I reported this bug to Mozilla and hope to receive feedback soon on how to resolve the issue. In the meantime, you can use one of the workarounds below to prevent the issue from occurring in your application.
Resolution
Starting in v4.1, 3D WebView includes a workaround to automatically mitigate the issue when it occurs. So, if you're using an older version of 3D WebView, please upgrade to v4.1 and check if it resolves the issue for you.
If option #1 doesn't resolve the issue, it may be that 3D WebView is failing to automatically detect that the issue is occurring. If that's the case, you can call AndroidGeckoWebView.RestoreAudioFocus() when the issue occurs in order to programmatically resolve it.
If the options above don't resolve the issue, then an alternative is to switch to using the non-Gecko 3D WebView for Android package, which doesn't experience this audio issue. This article describes the difference between the two android packages.