I'm trying to build a chrome extension that plays an audio file when a value on the page changes to alert the user that it has changed. Sometimes it works, but other times it says that the "play()" method was not allowed because "The user has not interacted with the webpage."
It will usually work when the webpage is first loaded, but when navigated away within the same site it will often throw this error.
This question can be split into two smaller questions:
- What counts as a "User interaction," in Chrome? I can't seem to find any information on this.
- Is there any way to check using Javascript if the "User interaction," flag has been set?