From 72f792b528843455e21f95eb9f02c9e9673f6a3e Mon Sep 17 00:00:00 2001 From: Youenn Fablet Date: Thu, 11 Jan 2024 16:01:16 +0100 Subject: [PATCH] Explicitly create MediaStream tracks in getDisplayMedia algorithm --- index.html | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index db39ee4..f86a432 100644 --- a/index.html +++ b/index.html @@ -243,6 +243,11 @@

MediaDevices Additions

    +
  1. +

    Let mediaDevices be [=this=].

    +
  2. + +
  3. Let controller be options.controller if present, or @@ -468,8 +473,25 @@

    MediaDevices Additions

  4. -

    Let stream be the {{MediaStream}} object for - which the user granted permission.

    +

    Let stream be a {{MediaStream}} object.

    +
  5. + +
  6. +

    For each source that the user granted permission + to, run the following steps:

    +
      +
    1. +

      Let track be the result of [=create a + MediaStreamTrack|creating a MediaStreamTrack=] + with source and mediaDevices.

      +
    2. +
    3. +

      Add track to stream track's set.

      +
    4. +
    5. +

      [=Tie track source to MediaDevices=] with source and mediaDevices.

      +
    6. +