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

Inflexible web audio worklet module query #21836

Open
MatthieuMv opened this issue Apr 26, 2024 · 1 comment
Open

Inflexible web audio worklet module query #21836

MatthieuMv opened this issue Apr 26, 2024 · 1 comment

Comments

@MatthieuMv
Copy link

I am using WebAudio API to spawn a worklet thread.
The worklet module is resolved as a relative path and forces the web server to serve the file in the same url.

In my use case, I have a specific url prefix for all wasm files which is incompatible with generated emscripten module.
I had to tape this using a post build script so that the url is resolved.

To fix this, I changed audioWorklet.addModule("MyModule.js"), to audioWorklet.addModule(locateFile("MyModule.js")).

I believe this is a valuable fix but if it's not, it means that there is a missing feature in this module to customise url prefix.

Thank you

@MatthieuMv MatthieuMv changed the title Inflexible web audio worklet module resolution Inflexible web audio worklet module query Apr 26, 2024
@sbc100
Copy link
Collaborator

sbc100 commented Apr 30, 2024

Yes, that sounds like a good fix. Would you be able to submit a PR perhaps?

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

No branches or pull requests

2 participants