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

Remove options parameter of AudioWorkletProcessor constructor #2036

Closed
karlt opened this issue Aug 21, 2019 · 4 comments · Fixed by #2040
Closed

Remove options parameter of AudioWorkletProcessor constructor #2036

karlt opened this issue Aug 21, 2019 · 4 comments · Fixed by #2040
Assignees
Projects

Comments

@karlt
Copy link
Contributor

karlt commented Aug 21, 2019

#1965 (comment) says

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.

@hoch
Copy link
Member

hoch commented Aug 21, 2019

@karlt The quote indentation seems incorrect. Can you clarify what the issue is here?

@hoch hoch added this to Untriaged in V1 Aug 21, 2019
@hoch
Copy link
Member

hoch commented Aug 21, 2019

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).

@hoch
Copy link
Member

hoch commented 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.

@hoch hoch self-assigned this Aug 21, 2019
@hoch hoch moved this from Untriaged to In WG Discussion in V1 Aug 21, 2019
@karlt
Copy link
Contributor Author

karlt commented Aug 21, 2019

@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).

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

@hoch hoch moved this from In WG Discussion to Ready for Editing in V1 Aug 21, 2019
V1 automation moved this from Ready for Editing to Done Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
V1
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants