Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari iOS/macOS - Game audio continues playing after leaving page #5370

Closed
AdamXA opened this issue Oct 22, 2020 · 6 comments
Closed

Safari iOS/macOS - Game audio continues playing after leaving page #5370

AdamXA opened this issue Oct 22, 2020 · 6 comments

Comments

@AdamXA
Copy link
Contributor

AdamXA commented Oct 22, 2020

Version

  • Phaser Version: 3.24.1 and earlier
  • Operating system: macOS 10.15.7 and iOS 14
  • Browser: Confirmed on Safari 14.0, seen on older versions too.

Description

  • Bug only occurs on iOS/macOS Safari.
  • Bug occurs only when an iframe on the page redirects to the same domain.
  • Bug only occurs when Web Audio is enabled.

When I click on an iframe on the same page as the game, that tells the browser to navigate to another page on the domain, any game sound that is currently playing will continue playing on another webpage.

Example Test Code

https://github.com/AdamXA/phaser3-webaudio-bug

git clone git@github.com:AdamXA/phaser3-webaudio-bug.git npm install npm start
Forked from Phaser 3 boilerplate.

In the example, once it is running, hear the audio playing, then click the white "Click here" text in the top left of the canvas to be redirected.

Additional Information

This is one weird bug.

@photonstorm
Copy link
Collaborator

You're navigating away from the page in which Phaser lives? If so, I can't see how we could possibly fix this, sounds like (yet another) Safari bug to me.

@AdamXA
Copy link
Contributor Author

AdamXA commented Oct 22, 2020

Thanks I'll try forward it onto them then 👍

@AdamXA
Copy link
Contributor Author

AdamXA commented Oct 22, 2020

@AdamXA
Copy link
Contributor Author

AdamXA commented Feb 16, 2021

should be fixed in Safari Tech Preview 117

@photonstorm
Copy link
Collaborator

That's unusually quick of them to address :)

@photonstorm
Copy link
Collaborator

Closing this off as they've thankfully fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants