| Summary: | Only require a "transient" user activation for Web Audio rendering | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Spura <david.spura> |
| Component: | Web Audio | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Major | CC: | cdumez, eric.carlson, jer.noble, karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari 16 | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=248061 | ||
|
Description
David Spura
2022-11-08 06:09:44 PST
Safari has stricter use gesture requirements than other browsers. We don't allow starting rendering without a user gesture. I see the demo asks the user to click a button to start rendering but my bet is that it actually starts the rendering asynchronously after getting the click. Yes, I mean the click handler calls an async function which does a: ``` await e.audioWorklet.addModule(n), ``` Before it connects the node to the graph. By that time, the user gesture is lost in Safari. I wish we could relax the user gesture requirement a bit (e.g. only require a "recent" gesture) but I usually get push back from our media team when I suggest that. Pull request: https://github.com/WebKit/WebKit/pull/6529 Committed 256721@main (7cc4b4216132): <https://commits.webkit.org/256721@main> Reviewed commits have been landed. Closing PR #6529 and removing active labels. |