Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sound playback on mobile #169

Open
Sothatsit opened this issue May 10, 2021 · 1 comment
Open

Fix sound playback on mobile #169

Sothatsit opened this issue May 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Sothatsit
Copy link
Collaborator

The mobile client has a lot of issues with audio due to the browser requiring user interaction events to play sounds.

I think there is a workaround for this however. It seems that each interaction allows you to play one Audio object as many times as you like! Therefore, I am thinking that on each interaction with the browser we could add to a pool of Audio objects to use to play audio on mobile. Whenever we need to play a sound, we can then swap the src of these Audio objects to the sound we want to play, and play the sound!

@Sothatsit Sothatsit added the bug Something isn't working label May 10, 2021
@Sothatsit
Copy link
Collaborator Author

We could also consider using a pre-existing solution such as Howler.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant