You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove options parameter of AudioWorkletProcessor constructor #2036
step 2 says that the AudioWorkletProcessor is initialized using options. At the moment this is a no-op, as the following note says. That's fine, but in that case why have this step listed at all?
This is not relevant anymore.
though nothing actually forces them to, since the argument is optional, right? And at the moment the superclass (and indeed UA code in general) does nothing with the object, as far as I can tell.
This is also changed. Now the construction relies on "processor construction data", so the user code does not need to use "super(options)" to initialize the internals correctly.
User still can pass options to deliver user-defined data to the AWP subclass. The only difference here is the user code doesn't have to call super(options).
Also there is more work to do on "processor construction data", so I will fix the rest of the spec (text, code example) when we have a clear picture on how to use it.
@karlt The quote indentation seems incorrect. Can you clarify what the issue is here?
The issue is that the AudioWorkletProcessor constructor has an unused options parameter, which is confusing, as reported in #1965.
The quoted text seems to agree that it is unused.
User still can pass options to deliver user-defined data to the AWP subclass. The only difference here is the user code doesn't have to call super(options).
Activity
hoch commentedon Aug 21, 2019
@karlt The quote indentation seems incorrect. Can you clarify what the issue is here?
hoch commentedon Aug 21, 2019
User still can pass
optionsto deliver user-defined data to the AWP subclass. The only difference here is the user code doesn't have to callsuper(options).hoch commentedon Aug 21, 2019
Also there is more work to do on "processor construction data", so I will fix the rest of the spec (text, code example) when we have a clear picture on how to use it.
karlt commentedon Aug 21, 2019
The issue is that the
AudioWorkletProcessorconstructor has an unusedoptionsparameter, which is confusing, as reported in #1965.The quoted text seems to agree that it is unused.
The subclass constructor parameters are declared at https://webaudio.github.io/web-audio-api/#callbackdef-audioworkletprocessorconstructor and unrelated to the base class constructor. This issue is about the
AudioWorkletProcessor(base) class constructor described at https://webaudio.github.io/web-audio-api/#ref-for-dom-audioworkletprocessor-audioworkletprocessor%E2%91%A0