I am using Cocos Creator 3.3.2
In my project I only have a button and when it get clicked I want to play a sound.
I have an audio source with a audio clip in the scene.
-
But when i click the button first time the sound does not get played. If I click any ware on the scene after that, the sound does play.
-
If I reload the scene then the button click does play the sound
-
But if I do a hard reload in incognito mode then sound does not play on the first try
In the console I can see this message.
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
Since I click the button I don’t see why the audio does not get played.
Please download the sample project with following link
https://drive.google.com/file/d/1DflxLSGrqktuVapB_IXRh3SiX5__6Psl/view?usp=sharing
Can you please advice how to get this issue fixed?