From ea67069b19936f3f90173354527b21dc01883875 Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Wed, 9 Oct 2024 13:46:36 +0200 Subject: [PATCH] Introduce ViewportMediaStreamOptions Fixes #21. --- index.html | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1dc5b1c..76f7343 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,7 @@

MediaDevices Additions

 partial interface MediaDevices {
   Promise<MediaStream> getViewportMedia(
-      optional DisplayMediaStreamOptions options = {});
+      optional ViewportMediaStreamOptions options = {});
 };
@@ -316,6 +316,67 @@

MediaDevices Additions

+
+

ViewportMediaStreamOptions

+

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

+
+
+            dictionary ViewportMediaStreamOptions {
+            (boolean or MediaTrackConstraints) video = true;
+            (boolean or MediaTrackConstraints) audio = false;
+            CaptureController controller;
+            };
+          
+
+

Dictionary ViewportMediaStreamOptions Members

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

+ If true, it requests that the returned {{MediaStream}} contain a video track. If a + Constraints 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 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 for display surface chosen by the user. If a + Constraints 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. +

+
+
+ controller of type {{CaptureController}} +
+
+

+ If present, this {{CaptureController}} object will be associated with the + capture-session. Through the methods exposed on + this object, the capture-session can be + manipulated. +

+
+
+
+
+

Constrainable Properties for Captured Viewport Surfaces