From cecf76cb80df362208f7838d625a924c7827e73b Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 16 Jun 2022 15:44:38 -0400 Subject: [PATCH] Separate ViewportMediaStreamConstraints dictionary. --- index.html | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 5642806..edd1c5f 100644 --- a/index.html +++ b/index.html @@ -109,7 +109,7 @@

partial interface MediaDevices {
   Promise<MediaStream> getViewportMedia(
-      optional DisplayMediaStreamConstraints constraints = {});
+      optional ViewportMediaStreamConstraints constraints = {});
 };
@@ -358,6 +358,49 @@

those relevant to {{MediaDevices/getDisplayMedia()}}, as defined in 5.4 Constrainable Properties for Captured Display Surfaces. +
+

ViewportMediaStreamConstraints

+

The ViewportMediaStreamConstraints dictionary is used to + instruct the user agent what sort of {{MediaStreamTrack}}s may be + included in the {{MediaStream}} returned by + {{MediaDevices/getViewportMedia}}.

+
+
+dictionary ViewportMediaStreamConstraints {
+  (boolean or MediaTrackConstraints) video = true;
+  (boolean or MediaTrackConstraints) audio = false;
+};
+
+

Dictionary ViewportMediaStreamConstraints + Members

+
+
video of type (boolean or {{MediaTrackConstraints}}), + defaulting to true
+
+

If true, 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 false, the + request will be [=rejected=] with a {{TypeError}}, as per the + {{MediaDevices/getViewportMedia}} algorithm.

+
+
audio of type (boolean or {{MediaTrackConstraints}}), + defaulting to false
+
+

If true, it signals an interest that the + returned {{MediaStream}} contain an audio track, if + supported and audio is available. + If a {{MediaTrackConstraints}} structure is provided, it + further specifies desired processing options to be applied to + the audio track. If false, the {{MediaStream}} + will not contain an audio track.

+
+
+
+
+

Permissions Integration