Skip to content

Support blob URLs in AudioWorklet addModule#103

Merged
dy merged 2 commits into
masterfrom
copilot/support-blob-urls-in-audio-context
May 9, 2026
Merged

Support blob URLs in AudioWorklet addModule#103
dy merged 2 commits into
masterfrom
copilot/support-blob-urls-in-audio-context

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

AudioContext.audioWorklet.addModule() supported inline data: URLs and filesystem paths, but rejected blob: URLs commonly produced by bundlers and browser-compatible libraries.

  • Module loading

    • Detects blob: URLs in AudioWorklet.#readModule()
    • Reads module source with fetch(url).text() before evaluating in the worklet scope
  • Coverage

    • Adds an AudioWorklet test that registers a processor from a Blob object URL
const url = URL.createObjectURL(new Blob([processorCode], {
  type: 'text/javascript'
}))

await context.audioWorklet.addModule(url)

Copilot AI assigned Copilot and dy May 9, 2026
Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Support "blob:" URLs in AudioContext.audioWorklet.addModule Support blob URLs in AudioWorklet addModule May 9, 2026
Copilot AI requested a review from dy May 9, 2026 20:53
Copilot finished work on behalf of dy May 9, 2026 20:53
@dy dy marked this pull request as ready for review May 9, 2026 20:56
@dy dy merged commit 992c157 into master May 9, 2026
5 checks passed
@dy dy deleted the copilot/support-blob-urls-in-audio-context branch May 9, 2026 20:57
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.

support "blob:..." urls in AudioContext.audioWorklet.addModule

2 participants