Skip to content

fix: audioworklet registerProcessor should expect a constructor not a function #1296

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

Merged
merged 5 commits into from
Mar 23, 2022
Merged

Conversation

mathe42
Copy link
Contributor

@mathe42 mathe42 commented Mar 22, 2022

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@saschanaz
Copy link
Contributor

saschanaz commented Mar 23, 2022

Could you add a unit test too?

And I wonder a new type is needed here:

interface AudioWorkletProcessorImpl extends AudioWorkletProcessor {
  process(...);
}

interface AudioWorkletProcessorConstructor {
    new (options: any): AudioWorkletProcessorImpl;
}

@mathe42
Copy link
Contributor Author

mathe42 commented Mar 23, 2022

Will look into it...

@mathe42
Copy link
Contributor Author

mathe42 commented Mar 23, 2022

closes also #1298

Copy link
Contributor Author

@mathe42 mathe42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saschanaz added test and extra type.

@@ -0,0 +1,8 @@
registerProcessor(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added test in extra folder as other files has to be included. If other setup is needed say how to change it.

@saschanaz
Copy link
Contributor

lgtm

Thank you!

@mathe42
Copy link
Contributor Author

mathe42 commented Mar 23, 2022

@saschanaz did not get merged!?

@saschanaz
Copy link
Contributor

Hmm?

LGTM

@github-actions github-actions bot merged commit b082106 into microsoft:main Mar 23, 2022
@github-actions
Copy link
Contributor

Merging because @saschanaz is a code-owner of all the changes - thanks!

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 this pull request may close these issues.

AudioWorkletProcessor can't be constructed like in the examples
3 participants