Skip to content

MediaStreamAudioSourceNode constructor has weird check for AudioContext #2149

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

Closed
bzbarsky opened this issue Feb 7, 2020 · 4 comments
Closed
Assignees

Comments

@bzbarsky
Copy link

bzbarsky commented Feb 7, 2020

https://webaudio.github.io/web-audio-api/#dom-mediastreamaudiosourcenode-mediastreamaudiosourcenode step 1 says:

If context is not an AudioContext, throw an NotSupportedError exception and abort these steps.

but the arg is declared as AudioContext in the IDL, so how could it not be an AudioContext? Is it possible this dates back to before BaseAudioContext existed?

@bzbarsky bzbarsky added Needs Discussion The issue needs more discussion before it can be fixed. Untriaged labels Feb 7, 2020
@bzbarsky
Copy link
Author

bzbarsky commented Feb 7, 2020

@rtoy
Copy link
Member

rtoy commented Feb 11, 2020

Yeah, these are all from the time when we didn't have a clear distinction between OfflineAudioContext and AudioContext and had to do something to say that these can only be used with an AudioContext.

rtoy added a commit to rtoy/web-audio-api that referenced this issue Feb 13, 2020
In the constructor algorithm for all of the Media nodes, the first
item was a check that the context was an AudioContext.  But the
constructor requires an AudioContext, so the check is useless.  Remove
them.
@padenot padenot added In PR Review and removed Needs Discussion The issue needs more discussion before it can be fixed. Untriaged labels Feb 13, 2020
@rtoy rtoy closed this as completed in c4914d4 Feb 18, 2020
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

No branches or pull requests

3 participants