Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OT but how is the coin sound played without user input? Is it a WebAssembly thing enabling passive sound triggers?


If I remember correctly iOS is the only platform were that limitation ever existed.

https://stackoverflow.com/questions/12517000/no-sound-on-ios...


I get it on my web game on Android:

   Uncaught (in promise) DOMException: play() can only be initiated by a user gesture.
It's triggered in the game loop where the user event has been added to a queue so it's not in the same call stack. The coins are picked up in the air etc so I have a hard time believing they are within the same call stack since it's long after the jump.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: