phetsims / plinko-probability

"Plinko Probability" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
5 stars 7 forks source link

Sound continues sporadically when leaving the tab on Firefox #117

Open brooklynlash opened 3 years ago

brooklynlash commented 3 years ago

Test device Lenovo ThinkPad

Operating System Windows 10

Browser Firefox

Problem description When using the sim with multiple balls and the sound is on, if you change to a different tab, the sound still continues a bit.

Visuals https://drive.google.com/file/d/1v17rCBIzNmL-9Nxh8q0KQGBRE5-IfyFZ/view?usp=sharing

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: Plinko Probability URL: https://bayes.colorado.edu/dev/phettest/plinko-probability/plinko-probability_en.html?ea&brand=phet Version: 1.2.0-dev.6 (unbuilt) Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0 Language: en-US Window: 1728x858 Pixel Ratio: 2.2222222222222223/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (Mozilla) Vertex: attribs: 16 varying: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}

brooklynlash commented 3 years ago

Also noticed the same thing when doing testing for Forces and Motion: Basics

brooklynlash commented 3 years ago

Another note: I am pretty sure that the reason why is that simulations usually pause (at least while I am in Chrome) and they do not pause immediately in Firefox, so sound is continuing. Unsure if this is the actual reason, just an observation. EDIT: Only observed on Firefox, Chrome and Edge both stop sound when leaving the tab.

jbphet commented 3 years ago

I think this was assigned to me because I'm considered the "sound guy". Plinko does not use the most current sound library (tambo), and the older library doesn't mute sound that are not being played on the current screen. Upgrading to tambo would be the best way to address this, but I've discussed this with @ariel-phet in the past, and he doesn't want to take the time to do a full sound design on this sim right now.

I'll leave it to @chrisklus as the responsible dev to figure out what to do with this, but I think I'd either close it or defer it, since it doesn't seem like a major problem to me.