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

Audio resume fix #4788

Merged
merged 9 commits into from
Oct 26, 2022
Merged

Audio resume fix #4788

merged 9 commits into from
Oct 26, 2022

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Oct 25, 2022

Fixes #4760

iOS doesn't correctly resume on touchend event, but does on touchstart event.

This PR also simplifies manager suspend/resume logic a bit.

API Changes:

  • removed SoundManager options object

@slimbuck slimbuck requested a review from a team October 25, 2022 17:29
@slimbuck slimbuck self-assigned this Oct 25, 2022
@willeastcott
Copy link
Contributor

What about these lines:

https://github.com/playcanvas/engine/pull/4788/files#diff-bf489dbc39f80880f4921c574a985e18d6abd0c6716cd3d2907dbb96ed37e255R31-R32

That's public API:

https://developer.playcanvas.com/api/pc.SoundManager.html#SoundManager

So presumably this PR actually removes that option? I'm fine with that (to be honest, I'm not sure why anyone would want to use that option!). But if this is so, the docs should be updated.

@slimbuck
Copy link
Member Author

So presumably this PR actually removes that option? I'm fine with that (to be honest, I'm not sure why anyone would want to use that option!). But if this is so, the docs should be updated.

Oh yes, that code just didn't make any sense (and I assumed this was some legacy workaround). Perhaps I should investigate the origin of that option first and then decide whether to remove it entirely.

@slimbuck
Copy link
Member Author

The force option was added here
and doesn't appear to have ever done anything.

So do I just remove the jsdoc?

@willeastcott
Copy link
Contributor

Sure, but also the whole options object from the code (plus passing it in application.js) since that was the only option. 😄

@slimbuck
Copy link
Member Author

Sure, but also the whole options object from the code (plus passing it in application.js) since that was the only option. 😄

Done!

@willeastcott
Copy link
Contributor

OK, LGTM now. Nice job! 🙌

@willeastcott
Copy link
Contributor

But maybe call out the API change in the PR description!

@slimbuck
Copy link
Member Author

Thanks for your help @willeastcott !

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

Successfully merging this pull request may close these issues.

Audio is blocked from playing on iOS if user starts with a swipe gesture since 1.56
2 participants