1
0
Fork 0
firefox/dom/worklet/tests/worklet_audioWorklet.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
430 B
JavaScript

class DummyProcessWorkletProcessor extends AudioWorkletProcessor {
constructor() {
super();
}
process() {
// Do nothing, output silence
}
}
// We need to pass a valid AudioWorkletProcessor here, otherwise, it will fail,
// and the console.log won't be executed
registerProcessor("sure!", DummyProcessWorkletProcessor);
console.log(
globalThis instanceof AudioWorkletGlobalScope ? "So far so good" : "error"
);