[meta] block autoplay for web audio
Categories
(Core :: Audio/Video: Playback, enhancement, P2)
Tracking
()
People
(Reporter: alwu, Assigned: alwu)
References
(Depends on 1 open bug)
Details
(Keywords: meta)
Assignee | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
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
Assignee | ||
Comment 2•6 years ago
|
||
(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.
Comment 3•6 years ago
|
||
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
Assignee | ||
Comment 4•6 years ago
|
||
(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.
Updated•2 years ago
|
Description
•