phetsims / tambo

library containing code to support sonification of PhET simulations
MIT License
2 stars 4 forks source link

Sound stops when other tabs are open on iPad #156

Open Nancy-Salpepi opened 3 years ago

Nancy-Salpepi commented 3 years ago

When testing https://github.com/phetsims/qa/issues/717 using iPad Air 2 iPadOS 15.0.2 (name Leibniz), I noticed that the sound stopped working on the Friction dev-test sim once I opened another tab, manipulated things in that tab, and then went back to the Friction sim. If I then closed that tab, the sound returned.

Steps to Reproduce:

  1. Open the dev version of the friction sim on the iPad and move book to generate sound
  2. Open a new tab, go to the PhET website and open GFL:B
  3. Move items in that sim to generate noise
  4. Return to friction sim--sound no longer works
  5. Return to GFL:B tab, sound still works (although I was sometimes getting a delay here that I can't reliably reproduce)
  6. Close GFL:B tab--sound returns to Friction Sim

Sound stops working video:

https://user-images.githubusercontent.com/87318828/138125370-fecc9f74-d1f4-441a-879f-a51142f28b84.mov

Sound returns video:

https://user-images.githubusercontent.com/87318828/138125421-e1e27da0-8ee1-442b-970b-81a294e9b95c.mov

Sounds delayed in published sim video:

https://user-images.githubusercontent.com/87318828/138125489-811e7a35-0fab-454d-8a89-830df95f5624.mov

stemilymill commented 3 years ago

When I was trying to reproduce this earlier on iPad Pro 10.5 inch iPadOS 15.0, sounds for Friction were fine and GFLB didnt have a delay, but after switching between the two open tabs GFLB didnt have any sound at all.

I have not been able to consistently reproduce but the general steps are: Open tab with published GFLB sim Open another tab with Friction dev Play with GFLB briefly to make sounds Switch to Friction tab and play with it to make sounds Go back to GFLB, sound may not work at all

refreshing the page or closing/minimizing and reopening safari should make sound work again

KatieWoe commented 3 years ago

I am seeing the delayed sound on the published version of Fourier Making Waves and Friction 1.6.0-dev19. I haven't seen the sound stop yet.

KatieWoe commented 3 years ago

This is the behavior on Fourier:

https://user-images.githubusercontent.com/41024075/138132453-32ecfb67-ea2c-4206-b591-818a73855c91.MOV

KatieWoe commented 3 years ago

Here are the steps that worked for me:

  1. Have two sims with sound open
  2. While viewing one sim, put the iPad to sleep and leave it for a few minutes
  3. Come back, the sim you were viewing when the iPad was put to sleep will still have normal sound, but the other will have delayed sound.

I did this test with Fourier and Build a Molecule, both published.

jbphet commented 3 years ago

I thought I'd see if I could reproduce these issues on the as-yet-unnamed iPad 4 that I have, an A2270 running iOS 14.4. I can't reproduce the problem when running the exact sequence of steps listed in the opening comment above, but if I switch back and forth a bunch of times between the two sims, it will get into a state where sound isn't working anymore on one of the two sims, usually GFL:B.

I wasn't able to duplicate the issue with the sequence that @KatieWoe described just above.

I'll ask @kathy-phet about how this should be prioritized. I have some ideas of things to investigate, but it can be a time consuming process, so I'll need some input on how to work this in.

KatieWoe commented 3 years ago

I was also unable to reproduce this on the iPadOS 14 test device.

kathy-phet commented 3 years ago

We don't have the bandwidth to fix this at the moment, and it seems like something that we can live with for now. @emily-phet - Please let me know if you disagree, and think this is an issue that needs more immediate attention and would be blocking for Friction? I will ask @jbphet to put it on his backlog list to investigate when fewer high priority items on his plate.

emily-phet commented 3 years ago

I agree - this should not be blocking. @jbphet, one of the things we'll talk about in the annual planning meeting early December are infrastructure issues we'd like to address. It might be helpful to consider things like this for that discussion, in case you'd like bring up potentially having some dedicated time during a quarter in 2022 for addressing specific Tambo issues that may have come up over time but are not yet investigated fully or addressed.

jbphet commented 2 years ago

Reviewed with the sound design team, marking as low priority for now since it isn't likely to bother a lot of people and it can be time consuming to track this sort of issue down.

jbphet commented 1 year ago

I unassigned @zepumph, since I'm fairly certain this will fall to me to investigate and fix if and when it becomes a higher priority.

Nancy-Salpepi commented 1 year ago

Funny you just commented on this @jbphet ....because it happened to me earlier today. Today I was using an iPad 9th generation with iOS 16.

Nancy-Salpepi commented 1 year ago

@jbphet @zepumph I am noticing this issue again in https://github.com/phetsims/qa/issues/863, on macOS 13.0.1 + safari 16.1. When I switch windows/tabs and then return to Ratio and Proportion there is a delay in the sound.

zepumph commented 1 year ago

@emily-phet and I say this doesn't block Ratio and Proportion

Nancy-Salpepi commented 6 months ago

Just noting that I still see this issue with every sim I test using mac/iPad + safari.