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

getCapabilities should throw TypeError if invalid kind is provided #1495

Closed
soareschen opened this issue Jul 19, 2017 · 2 comments
Closed

getCapabilities should throw TypeError if invalid kind is provided #1495

soareschen opened this issue Jul 19, 2017 · 2 comments
Assignees

Comments

@soareschen
Copy link
Contributor

Currently the behavior for invalid kind is undefined.

@aboba
Copy link
Contributor

aboba commented Jul 27, 2017

@soareschen Can you submit a PR?

@aboba
Copy link
Contributor

aboba commented Aug 17, 2017

I believe that getCapabilities(kind) will return null if kind is unsupported, rather than throwing a TypeError. This seems preferable, because kind can be extended by other specifications. For example, we cannot say that kind needs to be "audio" or "video" because https://www.w3.org/TR/mediacapture-depth/ defines the "depth" kind, and therefore getCapabilities("depth") might return capabilities in some implementations.

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

No branches or pull requests

3 participants