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

Allow device capabilities to be discoverable via enumerateDevices #211

Merged
merged 6 commits into from
Sep 30, 2015
18 changes: 16 additions & 2 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,8 @@ <h3>MediaDevices</h3>
a copy of <var>resultList</var>, and all its elements, where
the <code><a href=
"#widl-MediaDeviceInfo-label">label</a></code> member is the
empty string.</p>
empty string and the <code><a href=
"#widl-MediaDeviceInfo-capabilities">capabilities</a></code> member is <code>null</code>.</p>
Copy link
Member

Choose a reason for hiding this comment

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

We don't have the capabilities member (attribute) anymore. I think you can simply remove this since the wanted behaviour is already documented in the description of getCapabilites().

</li>

<li>
Expand Down Expand Up @@ -2360,7 +2361,7 @@ <h2>Access control model</h2>

<p>If access has been granted for a media device, the
<code><a>MediaDeviceInfo</a></code> dictionary will contain the
deviceId, kind, label, and groupId.</p>
deviceId, kind, label, capabilities and groupId.</p>
</section>
</section>

Expand Down Expand Up @@ -2404,6 +2405,19 @@ <h2>Device Info</h2>
MUST return the empty string.</p>
</dd>

<dt>readonly attribute MediaTrackCapabilities capabilities</dt>

<dd>
<p>Returns a default set of capabilities describing the device's audio or video track
(according to its <code>kind</code> value), in the absence of any user-supplied constraints.
For input devices these capabilities will be identical to those that would have been obtained by calling
<code>getCapabilities()</code> on the first <code><a>MediaStreamTrack</a></code> of this type in a
<code><a>MediaStream</a></code> returned by <code>getUserMedia({deviceId: <i>id</i>})</code>
where <i>id</i> is the value of the <code>deviceId</code> attribute of this <code>MediaDeviceInfo</code>.
For output devices, the capabilities describe a hypothetical MediaStreamTrack whose characteristics
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit unsure about the applicability to output devices. Did we ever discuss that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we missed this in our earlier discussion. However, there is presently no output analogue to getUserMedia() that would hypothetically supply the capabilities of an output device. Without some kind of definition similar in spirit to the above, we seem to have no way to determine the capabilities of output devices until the Audio Output API is fleshed out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we should delete the sentence about output devices, and declare that we'll figure that one out later.

exactly match those of the device.</p>
</dd>

<dt>readonly attribute DOMString groupId</dt>

<dd>
Expand Down