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

The first sound played by a sim can be soft and/or shortened #147

Open
jbphet opened this issue Jul 26, 2021 · 0 comments
Open

The first sound played by a sim can be soft and/or shortened #147

jbphet opened this issue Jul 26, 2021 · 0 comments
Assignees

Comments

@jbphet
Copy link
Contributor

jbphet commented Jul 26, 2021

A few years ago all of the major browsers implemented an "autoplay" policy that prevents web pages from making any sounds until the user interacts with the page. This prevents sites from making sounds as soon as users land on the site, which was happening a lot for a while. In some of the implementations, such as in Chrome, the audio context won't allow anything to happen, even volume changes for gain nodes. Thus, a situation can arise where a bunch of volume changes and the playing of a sound are all kicked off by the first thing a user touches on a sim. This can result in the very first sound being cut off, or sounding soft, or both.

We've basically just decided to live with this for now, so I'll mark the issue as deferred. However, if we ever decided it was a big enough problem that we should address it, we could add some code to make the initial volume changes really quick, and to also delay the first playing of a sound until these were all done. It doesn't seem worth the cost in terms of code complexity for the relatively minor benefit, but it could be done.

Here are some related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant