Closed KatieWoe closed 4 years ago
This is sound related, over to @jbphet. Let me know if I can help.
This behavior is due to the autoplay policy that is implemented by most browsers these days. This policy prevents sound from being played by a web page until the user interacts with it. There are a number of GitHub issues related to this, and perhaps the most relevant is https://github.com/phetsims/tambo/issues/9. The particular behavior reported in this issue - i.e. that the first sound is somewhat soft - will happen any time the first action taken by a user produces a sound. I think the reason it happens is that the gain nodes associated with the audio contexts are turned up somewhat gradually, probably to avoid sudden, jolting sounds on the first interaction.
I thought about this a while back when I first noticed it in the Friction sim, and the only way I can think of to avoid the issue is to delay the initial sound. This wouldn't be super difficult, but it wouldn't be trivial either, and didn't seem to me to be worth the added complexity. It would also have the problem that the first sound might be noticeably delayed. @KatieWoe opined above that this "[p]robably doesn't need addressing if hard to fix". Given this input and the tradeoffs of addressing the problem, my recommendation is to just live with this, at least for now.
Back to you @zepumph since you're the publication lead on GFL. If you're okay with my recommendation, please close.
That sounds really good to me. Over to @KatieWoe to document this for QA how she sees fit and/or close.
Test device Dell Operating System Win 10 Browser Firefox Problem description For https://github.com/phetsims/QA/issues/480. Only noticed on Firefox so far. The first sound produced by the sim seems to be a bit softer than those produced after. Seems rather minor, may be in other sims as it is hard to notice. It does seem familiar, but I couldn't find another issue of it. Probably doesn't need addressing if hard to fix. Steps to reproduce
Troubleshooting information: