-
Notifications
You must be signed in to change notification settings - Fork 4
Separate ViewportMediaStreamConstraints dictionary. #22
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ <h2> | |
<pre class="idl" | ||
>partial interface MediaDevices { | ||
Promise<MediaStream> getViewportMedia( | ||
optional DisplayMediaStreamConstraints constraints = {}); | ||
optional ViewportMediaStreamConstraints constraints = {}); | ||
};</pre> | ||
<dl data-link-for="MediaDevices" data-dfn-for="MediaDevices" class="methods"> | ||
<dt> | ||
|
@@ -358,6 +358,49 @@ <h2 id="constrainable-properties"> | |
those relevant to {{MediaDevices/getDisplayMedia()}}, as defined in | ||
<a data-cite="SCREEN-CAPTURE#constrainable-properties"> | ||
5.4 Constrainable Properties for Captured Display Surfaces</a>. | ||
<section> | ||
<h2>ViewportMediaStreamConstraints</h2> | ||
<p>The <dfn>ViewportMediaStreamConstraints</dfn> dictionary is used to | ||
instruct the user agent what sort of {{MediaStreamTrack}}s may be | ||
included in the {{MediaStream}} returned by | ||
{{MediaDevices/getViewportMedia}}.</p> | ||
<div> | ||
<pre class="idl"> | ||
dictionary ViewportMediaStreamConstraints { | ||
(boolean or MediaTrackConstraints) video = true; | ||
(boolean or MediaTrackConstraints) audio = false; | ||
};</pre> | ||
<section> | ||
<h2>Dictionary <a class="idlType">ViewportMediaStreamConstraints</a> | ||
Members</h2> | ||
<dl data-link-for="ViewportMediaStreamConstraints" data-dfn-for= | ||
"ViewportMediaStreamConstraints" class="dictionary-members"> | ||
<dt><dfn><code>video</code></dfn> of type <code>(boolean or {{MediaTrackConstraints}})</code>, | ||
defaulting to <code>true</code></dt> | ||
<dd> | ||
<p>If <code>true</code>, it requests that the returned | ||
{{MediaStream}} contain a video track. If a {{MediaTrackConstraints}} | ||
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 will be [=rejected=] with a {{TypeError}}, as per the | ||
{{MediaDevices/getViewportMedia}} algorithm</a>.</p> | ||
</dd> | ||
<dt><dfn><code>audio</code></dfn> of type <code>(boolean or {{MediaTrackConstraints}})</code>, | ||
defaulting to <code>false</code></dt> | ||
<dd> | ||
<p>If <code>true</code>, it signals an interest that the | ||
returned {{MediaStream}} contain an audio track, if | ||
supported and audio is available. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's bake in that the user agent is allowed to offer the user the option to approve-without-audio even if the user asks for audio. Let's leave it up to user agents to decide if they want to offer that or not, though. Maybe: |
||
If a {{MediaTrackConstraints}} structure is provided, it | ||
further specifies desired processing options to be applied to | ||
the audio track. If <code>false</code>, the {{MediaStream}} | ||
will not contain an audio track.</p> | ||
</dd> | ||
</dl> | ||
</section> | ||
</div> | ||
</section> | ||
</section> | ||
<section data-cite="permissions"> | ||
<h2 id="permissions-intergration">Permissions Integration</h2> | ||
|
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.
{{MediaStreamTracks}} would also work, iianm...?