tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

worklet_audioWorklet.js (430B)


      1 class DummyProcessWorkletProcessor extends AudioWorkletProcessor {
      2  constructor() {
      3    super();
      4  }
      5 
      6  process() {
      7    // Do nothing, output silence
      8  }
      9 }
     10 
     11 // We need to pass a valid AudioWorkletProcessor here, otherwise, it will fail,
     12 // and the console.log won't be executed
     13 registerProcessor("sure!", DummyProcessWorkletProcessor);
     14 console.log(
     15  globalThis instanceof AudioWorkletGlobalScope ? "So far so good" : "error"
     16 );