Skip to content

s/DisplayMediaStreamConstraints/DisplayMediaStreamOptions/ + algo-fix #229

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 1 commit into from
Aug 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2>
</h2>
<pre class="idl"
>partial interface MediaDevices {
Promise&lt;MediaStream&gt; getDisplayMedia(optional DisplayMediaStreamConstraints constraints = {});
Promise&lt;MediaStream&gt; getDisplayMedia(optional DisplayMediaStreamOptions options = {});
};</pre>
<dl data-link-for="MediaDevices" data-dfn-for="MediaDevices" class="methods">
<dt>
Expand All @@ -162,8 +162,9 @@ <h2>
<p>Prompts the user for permission to live-capture their display.</p>
<p>
The user agent MUST let the end-user choose which [=display surface=] to share
out of all available choices every time, and MUST NOT use <var>constraints</var>
to limit that choice.
out of all available choices every time, and MUST NOT use
any {{MediaTrackConstraints}} in <var>options</var>.<code>video</code>
or <var>options</var>.<code>audio</code> to limit that choice.
</p>
<p>
The user agent MAY use the presence of the {{displaySurface}} constraint and its value to
Expand All @@ -173,8 +174,9 @@ <h2>
as this poses
<a href="#security-and-permissions">risks to user privacy</a>.
</p>
<p>
Other than the {{displaySurface}} constraint, <var>constraints</var> MUST be applied
<p>
Any {{MediaTrackConstraints}} in <var>options</var>.<code>video</code>
or <var>options</var>.<code>audio</code> MUST be applied
to the media chosen by the user only after the user has made their selection.
</p>
<p>
Expand Down Expand Up @@ -207,9 +209,14 @@ <h2>
attribute has the value {{InvalidStateError}}.</p>
</li>
<li>
<p>Let <var>constraints</var> be the method's first
<p>Let <var>options</var> be the method's first
argument.</p>
</li>
<li>
<p>Let <var>constraints</var> be
<code>[</code><var>options</var>.<code>audio</code>,
<var>options</var>.<code>video</code><code>]</code>.</p>
</li>
<li>
<p>If <code>constraints.video</code> is <code>false</code>,
return a promise [=reject|rejected=] with a newly
Expand Down Expand Up @@ -838,25 +845,25 @@ <h2><dfn>SurfaceSwitchingPreferenceEnum</dfn></h2>
</table>
</section>
<section>
<h2>DisplayMediaStreamConstraints</h2>
<p>The <dfn>DisplayMediaStreamConstraints</dfn> dictionary is used to
<h2>DisplayMediaStreamOptions</h2>
<p>The <dfn>DisplayMediaStreamOptions</dfn> dictionary is used to
instruct the user agent what sort of {{MediaStreamTrack}}s may be
included in the {{MediaStream}} returned by
{{MediaDevices/getDisplayMedia}}.</p>
<div>
<pre class="idl">
dictionary DisplayMediaStreamConstraints {
dictionary DisplayMediaStreamOptions {
(boolean or MediaTrackConstraints) video = true;
(boolean or MediaTrackConstraints) audio = false;
SelfCapturePreferenceEnum selfBrowserSurface;
SystemAudioPreferenceEnum systemAudio;
SurfaceSwitchingPreferenceEnum surfaceSwitching;
};</pre>
<section>
<h2>Dictionary <a class="idlType">DisplayMediaStreamConstraints</a>
<h2>Dictionary <a class="idlType">DisplayMediaStreamOptions</a>
Members</h2>
<dl data-link-for="DisplayMediaStreamConstraints" data-dfn-for=
"DisplayMediaStreamConstraints" class="dictionary-members">
<dl data-link-for="DisplayMediaStreamOptions" data-dfn-for=
"DisplayMediaStreamOptions" class="dictionary-members">
<dt><dfn><code>video</code></dfn> of type <code>(boolean or {{MediaTrackConstraints}})</code>,
defaulting to <code>true</code></dt>
<dd>
Expand Down