phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

First sound is quiet #283

Closed catherinecarter closed 3 months ago

catherinecarter commented 3 months ago

In playing with the sim, I noticed in dev.23 that the very first sound in the sim is very quiet, regardless of what I pressed.

Subsequent sounds (including the one that had originally been quiet) were normal volume.

I tested in both Safari and Chrome.

catherinecarter commented 3 months ago

@samreid noted that this is a tambo thing, where the browser needs the user to click anywhere to 'activate' the sound. This is not specific to PDL. @jbphet - is this something that we'll live with? Or is this worth brainstorming ways to fix?

jbphet commented 3 months ago

It is not a "tambo thing", it is a "browser thing". Browsers are prevented from playing sounds until the user interacts with the page in some way. There is a lot of information on the cause and our handling of it in https://github.com/phetsims/tambo/issues/147 and https://github.com/phetsims/tambo/issues/9.

Note that in the first issue I linked, it says "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." So, if you think this rises to the level where we should implement better handling of it, be sure to chime in on the issue and raise it for some possible attention in upcoming iterations.

matthew-blackman commented 3 months ago

Since this is a known issue and is being tracked elsewhere, this issue can be closed.