Skip to content

AudioWorklet can't initialize when mainScriptUrlOrBlob is a blob #24148

@JoeOsborn

Description

@JoeOsborn

If Module["mainScriptUrlOrBlob"] is set to a Blob, the call to AudioWorklet.addModule() on line 214 of libwebaudio.js passes the blob in as the argument, which stringifies the blob into [object Blob], which is then treated as a relative URL.

I have a workaround by using URL.createObjectURL, but the real fix would be to at least detect this error and ideally to check the type of mainScriptUrlOrBlob and call URL.createObjectURL if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions