+ 8
Why is an error raised within the SL app running on Android
The code referenced below runs well in the browser on both a pc and the Android device using Chrome and Firefox but shows an error in the SL app of 'Uncaught (in promise) NotAllowedError: play can only be initiated by a user gesture. Line 320.' Can anyone tell me why this is happening and how it can be avoided. The code has been made private for the time being since so many people appear to use the SL app and I would like to solve the problem before making it public again. The code can be seen at: https://code.sololearn.com/WMSWeV7ATN7D/#html
2 Antworten
+ 5
Thank you for your response Brains. Pressing the start button, in this case, is the user gesture which starts the game and the sound sequence but instead raises the error for what appears to be the first move only and this is what is confusing me at the moment. My thanks again.
+ 4
You cannot play audios automatically.You need a gesture from the user,like a click,a touchmove,a devicetilt or something