Open Bug 1511117 (block-autoplay-webaudio) Opened 6 years ago Updated 2 years ago

[meta] block autoplay for web audio

Categories

(Core :: Audio/Video: Playback, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: alwu, Assigned: alwu)

References

(Depends on 1 open bug)

Details

(Keywords: meta)

This bug is used to collect all block-autoplay web audio related issues.
Depends on: 1511120
Alias: block-autoplay-webaudio
Depends on: 1512277
Depends on: 1513733
Depends on: 1517324
Depends on: 1519188

Testing in firefox nightly (66.0a1) it seems like pages which only play sound after a user gesture are silenced if there is too much Web Audio nodes created before the user gesture. Is this the intended behavior?

Here is an example of a page which sets up a synthesizer, but does not play any sound until the user clicks: https://tonejs.github.io/examples/simpleSynth.html

The expected behavior is that any audio would be blocked sound until a user clicks and invokes context.resume() and then audio would be allowed to play. I think audio nodes which were started before the user gesture could then also be played.

Thanks for looking into it

(In reply to Yotam Mann from comment #1)

The expected behavior is that any audio would be blocked sound until a user clicks and invokes context.resume() and then audio would be allowed to play. I think audio nodes which were started before the user gesture could then also be played.

Now we would expect sites to call resume() explicitly or AudioScheduledSourceNode.start() after user activates sites with user gesture. We won't automatically resume AudioContext when user clicks site.

Thanks for your response. In the example i linked, if you click the mute button in the corner, it calls context.resume(), but there is still no audio on the site even after the context is resumed and reports itself as "running". Simpler examples (which use fewer components) do work using this same setup. For example this example with just an oscillator

(In reply to Yotam Mann from comment #3)

Thanks for your response. In the example i linked, if you click the mute button in the corner, it calls context.resume(), but there is still no audio on the site even after the context is resumed and reports itself as "running". Simpler examples (which use fewer components) do work using this same setup. For example this example with just an oscillator

Thank for your information! I'll take a look for this site later.

Flags: needinfo?(alwu)
Depends on: 1524026

I've filed bug 1524026 for comment3.

Flags: needinfo?(alwu)
Depends on: 1540599
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.