-
Notifications
You must be signed in to change notification settings - Fork 180
Description
Is your feature request related to a problem? Please describe.
There is currently no official Kotlin/JS example demonstrating how to create and load an AudioWorklet module. This gap complicates splitting processor code into separate files and properly loading them with audioContext.audioWorklet.addModule(),
especially given bundling challenges.
Describe the solution you'd like
Provide a clear example showing how to implement and load an AudioWorklet processor module in Kotlin/JS, covering best practices for bundling (e.g., with Vite or Webpack loaders).
Describe alternatives you've considered
Users typically resort to inline JS blobs or complex custom bundler setups without official guidance or examples.
Additional context
Slack discussion
JS example
script.js
await audioContext.audioWorklet.addModule("hiss-generator.js");
hiss-generator.js
registerProcessor("hiss-generator", HissGeneratorProcessor);
Related issues