FormularSumo / Galaxy-Collection-Web

Website/Web App version of the game hosted on GitHub Pages
https://formularsumo.github.io/Galaxy-Collection-Web/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Audio is paused whenever tab is in background #13

Open FormularSumo opened 2 weeks ago

FormularSumo commented 2 weeks ago

This is despite the game attempting to play it - pause_on_loose_focus is not on.

I think this is another one of those web limitations unless you use the write API which I can't with the current set-up. If so the best solution might be to to have audio always be paused when you leave anyway (to avoid any potential issues/audio stuttering to a stop), and just keep game logic running when the pause_on_loose focus setting is off - assuming this works properly everywhere - I don't think it always does on mobile. But like with #5 I'm not sure there's much I can do about that. As long as the toggle is off by default, it's better to have the option for desktop where it does work I think.

Current behaviour is that sometimes changing tab and coming back causes the track that was playing to be skipped as it thinks it has finished when it finds out it's not playing - but somehow manages to still remembers its place in that track when it gets round to it again :thinking: