[webkit-changes] [WebKit/WebKit] 7cc4b4: Only require a "transient" user activation for Web...

Chris Dumez noreply at github.com
Tue Nov 15 22:29:24 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7cc4b4216132642cf20a83a674947c4c578e86a7
      https://github.com/WebKit/WebKit/commit/7cc4b4216132642cf20a83a674947c4c578e86a7
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    A LayoutTests/webaudio/require-transient-activation-expected.txt
    A LayoutTests/webaudio/require-transient-activation.html
    M Source/WebCore/Modules/webaudio/AudioContext.cpp

  Log Message:
  -----------
  Only require a "transient" user activation for Web Audio rendering
https://bugs.webkit.org/show_bug.cgi?id=247614
rdar://102364692

Reviewed by Jer Noble.

Only require a "transient" user activation for Web Audio rendering instead of
having a strict synchronous user gesture requirement. Our behavior was so
strict it was confusing Web developers. It was also causing a lot of demo sites
to fail in Safari and work in other browsers.

For example:
- https://googlechromelabs.github.io/web-audio-samples/audio-worklet/basic/hello-audio-worklet/

Such demos require you to click a button but then they use an async function
and use `await` before actually starting the audio rendering.

* LayoutTests/webaudio/require-transient-activation-expected.txt: Added.
* LayoutTests/webaudio/require-transient-activation.html: Added.
* Source/WebCore/Modules/webaudio/AudioContext.cpp:
(WebCore::shouldDocumentAllowWebAudioToAutoPlay):

Canonical link: https://commits.webkit.org/256721@main




More information about the webkit-changes mailing list