RESOLVED INVALID 251532
REGRESSION (iOS 16.3): WebAudio muted when the silent switch is ON and when app goes to background
https://bugs.webkit.org/show_bug.cgi?id=251532
Summary REGRESSION (iOS 16.3): WebAudio muted when the silent switch is ON and when a...
Adrien iWebDJ
Reported 2023-02-01 10:57:22 PST
Hello! Two big issues with the WebAudio implementation in WKWebView : 1. since iOS 16.3 (new bug!), WebAudio is muted when the silent switch on the side of the phone is ON 2. since iOS 15 (!!), WebAudio is muted when the app goes to background. It is a known bug but it has been mistakenly flagged as "resolved/closed" here : https://bugs.webkit.org/show_bug.cgi?id=237878 3. as a bonus : when the power saving mode is ON, the WebView performance drops too much (15 FPS), making the app not fully usable. Here is a DEMO VIDEO of the problems : https://www.youtube.com/watch?v=lpVfctVj8qE These 3 points don't happen with Native Swift apps, so it is very confusing for the users and I assume it is a mistake! For now it is impossible to make a serious/usable music app in the WebView... Can someone please seriously look at this for a quick fix? A big thanks!!
Attachments
Alexey Proskuryakov
Comment 1 2023-02-02 18:46:01 PST
Let's track only issue #1 here, as the most recent regression. Please file separate reports about the other issues, as tracking them together reduces the chances of getting any fixed.
Radar WebKit Bug Importer
Comment 2 2023-02-02 18:46:14 PST
youenn fablet
Comment 3 2023-02-03 00:15:32 PST
The silent switch is silencing notifications so it might behave as expected. Using a MediaStreamAudioDestinationNode should probably fix 1, 2 and 3. It is probably a bit less efficient. We could think of changing our heuristics, but this might affect existing content. @Adrien, marking is as resolved invalid for now. Please reopen if needed.
hamish@risingsoftware.com
Comment 4 2023-11-12 19:33:29 PST
I agree with Adrien that this is confusing because native apps are not silenced in this way. Even more confusing, HTML5 Audio continues to be played in silent mode, but Webaudio is muted. I'm using iPadOS 16.3.1.
hamish@risingsoftware.com
Comment 5 2023-11-12 21:11:58 PST
This also occurs in 17.1.
youenn fablet
Comment 6 2023-11-12 22:29:27 PST
Can you try: navigator.audioSession.type = 'playback';
youenn fablet
Comment 7 2023-11-12 22:30:08 PST
This should help for silent mode at least. We need to do more work for the background case.
hamish@risingsoftware.com
Comment 8 2023-11-12 23:27:53 PST
Setting navigator.audioSession.type to 'playback' or 'play-and-record' helps. Thanks.
Note You need to log in before you can comment on or make changes to this bug.