phetsims / molarity

"Molarity" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molarity
GNU General Public License v3.0
2 stars 6 forks source link

When in full screen mode, VO states "audio is playing in a background tab" after any sound is made #157

Closed loganbraywork closed 5 years ago

loganbraywork commented 5 years ago

Test device Hooke (Mac) Operating System 10.15 Browser Safari 13.02 Problem description From https://github.com/phetsims/QA/issues/436

In full screen mode, using VO on safari, any sound which is made (such as adjusting the sliders) will cause VO to state that "audio is playing in a background tab" before resuming normal function. Having tested both the published version of Resistance in a Wire and Molarity for the same issue, it only appears in Molarity. Light audio does not seem to trigger it. Possible VO bug rather than sim issue. Steps to reproduce

  1. Activate Voice Over
  2. Adjust any slider
jessegreenberg commented 5 years ago

I am actually not able to reproduce this with macOS 10.14.5 VoiceOver. Ill check system settings. Then Ill try and see if this happens in 10.15. @twant are you able to see this on your mac?

jessegreenberg commented 5 years ago

I enabled audio ducking in case that mattered, but I still wasn't seeing this. Im downloading 10.15 now.

jessegreenberg commented 5 years ago

Now that I have installed macOS 10.15 this is happening every time a sound plays in full screen mode. I am not sure why this is happening, but the way VoiceOver says "background tab" makes me think it could be fore similar reasons to the bug in #155. If we decide to work on this it would be helpful to see if @jbphet has any thoughts.

@emily-phet @terracoda do you think it is important for this issue to be resolved, and at what priority?

jessegreenberg commented 5 years ago

It doesn't look like we have any <audio> elements driving sound. I thought maybe that placement of such an element could be the cause of this (like in https://github.com/phetsims/molarity/issues/155). My new theory is that sounds are getting played from the scripts outside of the fullscreen scenery/Display div, and so VoiceOver is saying they are coming from a "background tab". Maybe we could test this in a simple app outside of a PhET sim.

jbphet commented 5 years ago

My new theory is that sounds are getting played from the scripts outside of the fullscreen scenery/Display div, and so VoiceOver is saying they are coming from a "background tab".

Seems viable to me. There is something odd about how full screen an audio interact, and I've had to add some handlers for resuming the audio context when exiting full screen mode, see for instance https://github.com/phetsims/vibe/issues/38. Maybe mobile Safari actually considers the full screen to somehow be a different tab.

That's about all I can add for now. If this becomes a priority, we may be able to add some debug code to monitor the state of the audio context to see if anything is going on there, but I'm not sure if it would lend much insight.

jessegreenberg commented 5 years ago

Thanks @jbphet, sounds good.

it only appears in Molarity. Light audio does not seem to trigger it.

I am also interested in going into this a bit further, would be good to know why it doesn't happen all the time.

@zepumph also recommended that testing in the tambo demo could be useful since it has lots of sound examples.

jessegreenberg commented 5 years ago

Discussed with @emily-phet and @zepumph, we are going to do a few tests to try to isolate the cause. If it seems like a bug with Safari/VO we can submit a bug report. If it still seems to be caused by our implementation we will decide then whether or not to spend time fixing.

jessegreenberg commented 5 years ago

This may also be resolved automatically after utteranceQueue is isolated and used by scenery.

zepumph commented 5 years ago

Pinging @jessegreenberg, as utteranceQueue is now in scenery. Perhaps you want to see what steps are now needed?

jessegreenberg commented 5 years ago

Nice, it sounds like we can test to see if this has been fixed. If not then we are back to the drawing board.

jessegreenberg commented 5 years ago

I just tested in Safari and saw that this is indeed fixed. I observed the problem again in https://phet-dev.colorado.edu/html/molarity/1.5.0-dev.23/phet/molarity_en_phet.html and saw that it is not happening anymore on master. Thanks for working on this @zepumph and @twant! I think this can be closed.