Caută ajutor

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Acest fir de discuție a fost arhivat. Adresează o întrebare nouă dacă ai nevoie de ajutor.

AudioContext and Autoplay

  • Niciun răspuns
  • 0 au această problemă
  • 1 vizualizare
more options

I am using AudioContext in a userscript to play a sound. The console shows "An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page."

It works after I add the the website in the Autoplay settings to "Allow Audio and Video".

Can I do something in the userscript to make it work without adding the site to Autoplay?

The reason I ask is because the site disappears from the Autoplay settings regularly and I have to set it again. Or is there a way to keep Firefox from "forgetting" this setting for a website?

I am using AudioContext in a userscript to play a sound. The console shows "An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page." It works after I add the the website in the Autoplay settings to "Allow Audio and Video". Can I do something in the userscript to make it work without adding the site to Autoplay? The reason I ask is because the site disappears from the Autoplay settings regularly and I have to set it again. Or is there a way to keep Firefox from "forgetting" this setting for a website?