Skip to content

Commit 0b70098

Browse files
committed
Better error message (to see why it fails)
1 parent 424f25f commit 0b70098

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/library_webaudio.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ let LibraryWebAudio = {
161161
#if WEBAUDIO_DEBUG
162162
console.log(`emscripten_start_wasm_audio_worklet_thread_async() adding audioworklet.js...`);
163163
#endif
164-
#if WEBAUDIO_DEBUG
165-
console.log(`emscripten_start_wasm_audio_worklet_thread_async() stack base/sb: ${stackLowestAddress}, size: ${stackSize} (${stackLowestAddress + stackSize})`);
166-
#endif
167164

168165
let audioWorkletCreationFailed = () => {
169166
#if WEBAUDIO_DEBUG
170-
console.error(`emscripten_start_wasm_audio_worklet_thread_async() addModule() failed!`);
167+
// Note about Cross-Origin here: a lack of Cross-Origin-Opener-Policy and
168+
// Cross-Origin-Embedder-Policy headers to the client request will result
169+
// in the worklet file failing to load.
170+
console.error(`emscripten_start_wasm_audio_worklet_thread_async() addModule() failed! Are the Cross-Origin headers being set?`);
171171
#endif
172172
{{{ makeDynCall('viip', 'callback') }}}(contextHandle, 0/*EM_FALSE*/, userData);
173173
};

0 commit comments

Comments
 (0)