From ffd34960de04cbb44984cfbe28f945a5d0d9d5df Mon Sep 17 00:00:00 2001 From: Youenn Fablet Date: Thu, 7 Apr 2022 10:01:59 +0200 Subject: [PATCH 1/2] Add support for background blur and configuration change event --- index.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/index.html b/index.html index 1ef8bfc..7894b08 100644 --- a/index.html +++ b/index.html @@ -417,5 +417,62 @@

Transferable MediaStreamTrack

In a sense, between these steps, the data holder is attached to the underlying source as if it was a track.

+
+

Exposing MediaStreamTrack source background blur support

+
+

Some platforms or User Agents may provide built-in support for background blurring of video frames, in particular for camera video streams. + Web applications may either want to control or at least be aware that background blur is applied at the source level. + This may for instance allow the web application to update its UI or to not apply background blur on its own. + For that reason, we extend {{MediaStreamTrack}} with the following properties. +

+
+
+

The WebIDL changes are the following: +

+partial dictionary MediaTrackSupportedConstraints {
+  boolean backgroundBlur = true;
+};
+
+partial dictionary MediaTrackConstraintSet {
+  ConstrainBoolean backgroundBlur;
+};
+
+partial dictionary MediaTrackSettings {
+  boolean backgroundBlur;
+};
+
+partial dictionary MediaTrackCapabilities {
+  sequence<boolean> backgroundBlur;
+};
+
+
+
+

Exposing change of MediaStreamTrack configuration

+
+

The configuration (capabilities, constraints or settings) of a {{MediaStreamTrack}} may be changed dynamically + outside the control of web applications. One example is when a user decides to switch on background blur through + the operating system. Web applications might want to know that the configuration + of a particular {{MediaStreamTrack}} has changed. For that purpose, a new event is defined below. +

+
+partial interface MediaStreamTrack {
+  attribute EventHandler onconfigurationchange;
+};
+

+

When the [=User Agent=] detects a change of configuration + in a track's underlying source, the [=User Agent=] MUST queue a task that runs the following steps:

+
    +
  1. + +

    Update track's capabilities, constraints and settings + according track's underlying source.

    +
  2. +
  3. +

    [=Fire an event=] named configurationchanged on track.

    +
  4. +
+

+
+
From e7e4adb9672959d413f2ffd477720ada863f333f Mon Sep 17 00:00:00 2001 From: Youenn Fablet Date: Thu, 19 May 2022 11:20:34 +0200 Subject: [PATCH 2/2] Add muted/readyState checks and fingerprint notes --- index.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 7894b08..56d0728 100644 --- a/index.html +++ b/index.html @@ -460,18 +460,27 @@

Exposing change of MediaStreamTrack configuration

};

When the [=User Agent=] detects a change of configuration - in a track's underlying source, the [=User Agent=] MUST queue a task that runs the following steps:

+ in a track's underlying source, the [=User Agent=] MUST run the following steps:

    +
  1. If track.{{MediaStreamTrack/muted}} is true, wait for track.{{MediaStreamTrack/muted}} + to become false or track.{{MediaStreamTrack/readyState}} to be "ended".

  2. +
  3. If track.{{MediaStreamTrack/readyState}} is "ended", abort these steps.

  4. +
  5. If track's capabilities, constraints and settings are matching source configuration, abort these steps.

  6. -

    Update track's capabilities, constraints and settings - according track's underlying source.

    +

    Update track's capabilities, constraints and settings according track's underlying source.

  7. -

    [=Fire an event=] named configurationchanged on track.

    +

    [=Fire an event=] named configurationchange on track.

+

+

+

These events are potentially triggered simultaneously on documents of different origins. + [=User Agents=] MAY add fuzzing on the timing of events to avoid cross-origin activity correlation.

+
+