Skip to content

Commit af002d5

Browse files
committed
Avoid calling addEventListener in audio worklet
1 parent fa80cf2 commit af002d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/library_wasm_worker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ addToLibrary({
145145
_emscripten_create_wasm_worker__postset: `
146146
if (ENVIRONMENT_IS_WASM_WORKER) {
147147
_wasmWorkers[0] = this;
148+
#if AUDIO_WORKLET
149+
// Audio Worklets do not have postMessage()ing capabilities.
150+
if (!ENVIRONMENT_IS_AUDIO_WORKLET)
151+
#endif
148152
addEventListener("message", _wasmWorkerAppendToQueue);
149153
}`,
150154
_emscripten_create_wasm_worker: (stackLowestAddress, stackSize) => {

0 commit comments

Comments
 (0)