Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioWorkletProcessor removed from globals.browser? #248

Closed
patwork opened this issue May 8, 2024 · 2 comments · Fixed by #249
Closed

AudioWorkletProcessor removed from globals.browser? #248

patwork opened this issue May 8, 2024 · 2 comments · Fixed by #249
Assignees

Comments

@patwork
Copy link

patwork commented May 8, 2024

Hello,

Why AudioWorkletProcessor and registerProcessor have been removed from globals in #224 ?

They are part of Web Audio API https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor

// white-noise-processor.js
class WhiteNoiseProcessor extends AudioWorkletProcessor {
  [....]
}
registerProcessor("white-noise-processor", WhiteNoiseProcessor);

If they are not among the standard global variables in browsers, is it possible to create a new list for them, for example globals.worklets or globals.browser.worklets, etc?

@fisker
Copy link
Collaborator

fisker commented May 8, 2024

Sorry for removing that, I think it's fine to add back to browser globals, but we use script to build the data now, better to find a way to get the worklet globals.

@fisker
Copy link
Collaborator

fisker commented May 8, 2024

This seems able to get the AudioWorkletGlobalScope, maybe somehow we can transfer to main frame?

await new AudioContext().audioWorklet.addModule("data:text/javascript,;console.log(globalThis)")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants