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

Fix WebAudio for Crodova based apps #6010

Merged

Conversation

kglogocki
Copy link
Contributor

@kglogocki kglogocki commented Feb 15, 2022

Please do not update the README or Change Log, we will do this when we merge your PR.

This PR (delete as applicable)

  • Fixes a bug

Describe the changes below:

When using Cordova, WebAudio doesn't work. It was fixed for Capacitor by adding check in src/loader/File.js that xhr.responseUrl starts with capacitor://. We are using different scheme for Cordova and it was not working for us. I've added configuration option to specify custom scheme to properly recognise if file is local and load sound file properly.

@photonstorm
Copy link
Collaborator

Thanks for the PR. Can you please remove all of the dist files, package-lock and types from it, as I cannot merge those.

@kglogocki
Copy link
Contributor Author

I removed dist files, package-lock and types. I also merged latest changes from master.

@photonstorm photonstorm merged commit 21bdac8 into phaserjs:master May 9, 2022
photonstorm added a commit that referenced this pull request May 9, 2022
… Loader considers as being local files. This is populated by the new `Phaser.Core.Config#loaderLocalScheme` game / scene config property. It defaults to `[ 'file://', 'capacitor://' ]` but additional schemes can be defined or pushed onto this array. Based on #6010
@photonstorm
Copy link
Collaborator

Thanks, I've merged this in and tweaked it a bit, so you can now specify an array of local schemes in the config, rather than just one. It's also available via the new LoaderPlugin.localSchemes property, too.

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

Successfully merging this pull request may close these issues.

None yet

2 participants