Bug 247614
| 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 | ||
David Spura
After registering processor to AudioWorklet, its process method does not get called.
Please try here: https://1006044.playcode.io/
Source of the sample: https://playcode.io/1006044
Mentioned sample works in firefox, chrome and edge.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/102364692>
Chris Dumez
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.
Chris Dumez
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.
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/6529
EWS
Committed 256721@main (7cc4b4216132): <https://commits.webkit.org/256721@main>
Reviewed commits have been landed. Closing PR #6529 and removing active labels.