[Webkit-unassigned] [Bug 276687] WebAudio goes silent when page is backgrounded for a while

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 25 10:50:32 PDT 2024


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

--- Comment #4 from Jason Boyd <jayboyd at gmail.com> ---
Well, I can now confirm that this issue goes away completely for me if I add a listener for visibilitychange and suspend/resume the context. So, AGAIN, the steps to reproduce are: 

1) Create a WebAudio context
2) Create ANY method that plays sounds, using either a loaded audio buffer or an oscillator
3) DO NOT suspend/resume the context when backgrounded

Expected behavior: The context should either remain active indefinitely OR should change its state to "suspended" if the browser is releasing the OS audio resources. Additionally something should be logged to the console to let the developer know the browser had to release the context's resources. 

Actual behavior: After an indeterminant amount of time, if backgrounded (either going to another browser tab or another app), the context claims it is still "running" and its currentTime is still incrementing, but no sound comes out of the speakers. RELOADING THE PAGE DOES NOT RESOLVE. 

Are you still insisting on sample code for the above? It's literally DO ANYTHING WITH WEBAUDIO. As long as the code does not suspend the context, the issue always occurs for me, though sometimes in minutes, other times in hours.

-- 
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/20240725/38e22c7f/attachment.htm>


More information about the webkit-unassigned mailing list