[Webkit-unassigned] [Bug 252746] Inconsistent audio playback behaviour when device is muted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 22 11:51:04 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=252746

Jer Noble <jer.noble at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jer.noble at apple.com

--- Comment #2 from Jer Noble <jer.noble at apple.com> ---
The original intent of the Web Audio API was to play short-duration, low latency sound effects. As such, we made the decision to map AudioContext generated audio to the system's "Ambient" audio behavior. Web Audio would be allowed to mix (rather than interrupt) other currently playing audio such as music or podcasts. However, it would "obey" the mute switch on the device, and would not be allowed to continue to play when the browser was not foreground. Since the primary use case was video game sound effects, this meant that in-browser game audio would behave the same as native game audio: audio plays through the headphones, obeys the mute switch, mixes with media playback in other applications, stops when backgrounding the app.

However, the use cases for Web Audio have grown to include long-form audio playback, and as you and others have noted, this means that pages using Web Audio for long-form audio playback see inconsistent behavior when compared to <audio> element playback. But without extra context from the page about _why_ Web Audio is being used, it's difficult to make "correct" decisions about how that audio should behave.

The intent of the Audio Session API is to allow pages to inform the User Agent of _how_ it should treat the audio generated by the page. If a page is using Web Audio for long-form media playback, it can and should say so, and the audio generated by Web Audio should be treated similarly to <audio> and <video> playback.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230222/5dd1c5a6/attachment.htm>


More information about the webkit-unassigned mailing list