-
Notifications
You must be signed in to change notification settings - Fork 22.7k
Align getCapabilities()
documentation with JavaScript runtime behavior
#39259
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs
(comment last updated: 2025-04-24 13:30:29) |
- `autoGainControl` | ||
- : A [`ConstrainBoolean`](/en-US/docs/Web/API/MediaTrackConstraints#constrainboolean) object reporting if the source can automatically control the input signal's gain. | ||
If the feature can be controlled by a script the source will report both true and false as possible values. | ||
- : A boolean or an array of booleans. If the device supports script-controlled toggling, you may see both `true` and `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an indication in the spec that this can be a single boolean value. Neither are the other values like latency
. Where is the source for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description here made me think that it can have a single boolean as a value.
The latency description here states:
The latency or latency range in seconds The latency is the time between start of processing (for instance, when sound occurs in the real world) to the data...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Josh-Cena, I added another file here to document the |
Description
As pointed out by #38249 the objects presented as the properties of the return value of the
getCapabilities()
, method were wrong. I removed that abstraction all together and mapped the properties to the actual runtime behavior developers see in JavaScript. There’s no need to introduce abstract or specialized types like "UDoubleRange" that might make developers think they’re dealing with a built-in, complex data type. This reduces unnecessary cognitive overhead.Motivation
Additional details
Related issues and pull requests
Fixes #38249