# FMod API Web AudioContext not allowed to start

**URL:** https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748
**Category:** FMOD Engine
**Tags:** javascript
**Created:** [October 8, 2023, 10:18am UTC](https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748 "2023-10-08T10:18:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DeltaElement](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@DeltaElement](https://qa.fmod.com/u/DeltaElement)
#### Post date: [October 8, 2023, 10:18am UTC](https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748/1 "2023-10-08T10:18:33Z")

</div>

Hi !  
I have a website with FMod audio integration but i have an error with my webbrowser when i load the page. I dont have any sound (FMod API working) and i have this warning on console **“The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page”**  
The page’s audio launches a few times, but it’s not stable at all.  
Do I need to create a button to activate FMOD’s audio engine with user interraction ?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [October 9, 2023, 4:22am UTC](https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748/2 "2023-10-09T04:22:47Z")

</div>

Hi,

While the warning you’re observing is expected, FMOD versions 2.02.07 and above should be handling the required resumption/creation by default. I don’t recall having the problem you’re describing when I tested your website project for a previous issue you were running into: [FMod Web API Failed to get parameter](https://qa.fmod.com/t/fmod-web-api-failed-to-get-parameter/20121)

What version of FMOD are you using? Also, can you elaborate on what exactly you mean by “not stable” - is it just that you don’t hear any audio, or do you also get artifacting such as stutters?

---

<div class="post-metadata">

### Author: ![DeltaElement](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@DeltaElement](https://qa.fmod.com/u/DeltaElement)
#### Post date: [October 14, 2023, 6:27am UTC](https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748/3 "2023-10-14T06:27:51Z")

</div>

Thanks for the response  
In reality the bug was on the browser side. My site has evolved a lot and as the sound was automatically triggered when the page was launched, the browser was blocking it. I corrected this bug by creating a button to access the page that launched the fmod script at the same time.  
For the audio bugs, the website has a script that avoids reloading the page each time it is loaded (to keep fmod audio). However, fmod may randomly rollback when switching from one page to another.  
Oh and im using FMod 2.02.09

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [October 17, 2023, 12:55am UTC](https://qa.fmod.com/t/fmod-api-web-audiocontext-not-allowed-to-start/20748/4 "2023-10-17T00:55:19Z")

</div>

> [@DeltaElement](#):
>
> In reality the bug was on the browser side. My site has evolved a lot and as the sound was automatically triggered when the page was launched, the browser was blocking it. I corrected this bug by creating a button to access the page that launched the fmod script at the same time.

It’s good to hear that you’ve found a solution!

> [@DeltaElement](#):
>
> For the audio bugs, the website has a script that avoids reloading the page each time it is loaded (to keep fmod audio). However, fmod may randomly rollback when switching from one page to another.

If I’m understanding “rollback” as the system or playing events restarting, this is likely not an issue with the FMOD system, and more likely to be an issue with how the webpage handles making sure the FMOD system/script persists. I would recommend placing your own logging calls in the FMOD script to see whether the script is being partially or completely re-run when it isn’t intended to be.

If it isn’t, you can swap to the logging versions of the FMOD libraries that have the “L” suffix (i.e. “fmodL” or fmodstudioL") , and call [`Debug_Initialize`](https://www.fmod.com/docs/2.02/api/core-api-common.html#debug_initialize) with the [debug flag](https://www.fmod.com/docs/2.02/api/core-api-common.html#fmod_debug_flags) set to DEBUG\_LEVEL\_LOG before creating your FMOD system, which will provide more information on what is happening to the FMOD system.
