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

Define DisplayMediaStreamConstraints dictionary with video = true #92

Merged
merged 2 commits into from
Nov 29, 2018
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
56 changes: 50 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h2>
<dfn>MediaDevices</dfn> Additions
</h2>
<pre class="idl">partial interface MediaDevices {
Promise&lt;MediaStream&gt; getDisplayMedia (optional MediaStreamConstraints constraints);
Promise&lt;MediaStream&gt; getDisplayMedia (optional DisplayMediaStreamConstraints constraints);
};</pre>
<dl data-link-for="MediaDevices" data-dfn-for="MediaDevices" class="methods">
<dt>
Expand Down Expand Up @@ -201,6 +201,12 @@ <h2>
<p>Let <var>constraints</var> be the method's first
argument.</p>
</li>
<li>
<p>If <code>constraints.video</code> is <code>false</code>,
return a promise <a>rejected</a> with a newly
<a data-link-for="exception" data-lt="create">created</a>
<code>TypeError</code>.</p>
</li>
<li>
<p>For each member
<a href="https://heycam.github.io/webidl/#dfn-present">present</a>
Expand Down Expand Up @@ -228,11 +234,6 @@ <h2>
types in <var>constraints</var> with either a dictionary
value or a value of <code>true</code>.</p>
</li>
<li>
<p>If <var>requestedMediaTypes</var> is the empty set, set
<var>requestedMediaTypes</var> to a set containing
<code>"video"</code>.</p>
</li>
<li>
<p>If the <a>current settings object</a>'s <a>responsible
document</a> is NOT <a data-cite=
Expand Down Expand Up @@ -581,6 +582,49 @@ <h2>
it is being captured.</p>
</div>
</section>
<section>
<h2>DisplayMediaStreamConstraints</h2>
<p>The <dfn>DisplayMediaStreamConstraints</dfn> dictionary is used to
instruct the User Agent what sort of <a>MediaStreamTrack</a>s may be
included in the <a>MediaStream</a> returned by
<code>getDisplayMedia</code>.</p>
<div>
<pre class="idl">dictionary DisplayMediaStreamConstraints {
(boolean or MediaTrackConstraints) video = true;
(boolean or MediaTrackConstraints) audio = false;
};</pre>
<section>
<h2>Dictionary <a class="idlType">DisplayMediaStreamConstraints</a>
Members</h2>
<dl data-link-for="DisplayMediaStreamConstraints" data-dfn-for=
"DisplayMediaStreamConstraints" class="dictionary-members">
<dt><dfn><code>video</code></dfn> of type <span class=
"idlMemberType"><a>(boolean or MediaTrackConstraints)</a></span>,
defaulting to <code>true</code></dt>
<dd>
<p>If <code>true</code>, it requests that the returned
<a>MediaStream</a> contain a video track. If a <a>Constraints</a>
structure is provided, it further specifies desired processing
options to be applied to the video track rendition of the
display surface chosen by the user. If <code>false</code>, the
request MUST be rejected with a <code>TypeError</code>.</p>
</dd>
<dt><dfn><code>audio</code></dfn> of type <span class=
"idlMemberType"><a>(boolean or MediaTrackConstraints)</a></span>,
defaulting to <code>false</code></dt>
<dd>
<p>If <code>true</code>, it signals an interest that the
returned <a>MediaStream</a> contain an audio track, if
supported and audio is available for display surface chosen by
the user. If a <a>Constraints</a> structure is provided, it
further specifies desired processing options to be applied to
the audio track. If <code>false</code>, the <a>MediaStream</a>
MUST NOT contain an audio track.</p>
</dd>
</dl>
</section>
</div>
</section>
<section>
<h2>
Extensions to <a class="idlType">MediaTrackSupportedConstraints</a>
Expand Down