AudioContext and Autoplay
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?