content icon indicating copy to clipboard operation
content copied to clipboard

ConvolverNode example needs user interaction

Open Eonasdan opened this issue 1 year ago • 1 comments

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode

What specific section or headline is this issue about?

ConvolverNode Example

What information was incorrect, unhelpful, or incomplete?

The codepen sample doesn't work without modification due to a Chromium restriction for playing sound without interaction.

What did you expect to see?

Working example

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

My suggestions are

  1. Change the sample code to init the sounds after clicking Start e.g.
function toggleSound(toggleButton) {
  if (!init) {
    initSound();
    init = true;
  }
///....
  1. Move the example to StackBlitz with as a complete example instead of linking to multiple codepen script files that hide part of the example.

MDN metadata

Page report details
  • Folder: en-us/web/api/convolvernode
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/convolvernode/index.md
  • Last commit: https://github.com/mdn/content/commit/e811fc31b67e145c5882e8e3f128d1938c627a51
  • Document last modified: 2023-02-19T01:35:01.000Z

Eonasdan avatar Apr 19 '24 12:04 Eonasdan

We should move this example into our webaudio-examples repo first.

Josh-Cena avatar Jun 28 '24 15:06 Josh-Cena