emscripten
emscripten copied to clipboard
Inflexible web audio worklet module query
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
Yes, that sounds like a good fix. Would you be able to submit a PR perhaps?