From fa57210048890555e714c0a94a08137e0da559a4 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Mon, 22 Jan 2024 12:17:49 -0500 Subject: [PATCH 01/12] Fix export of track-muted and set-track-muted. --- getusermedia.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index 0874d7d6..abce691e 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -897,7 +897,7 @@

Media Flow

There are two dimensions related to the media flow for a {{MediaStreamTrackState/"live"}} {{MediaStreamTrack}} : muted / not muted, and enabled / disabled.

-

Muted refers to the input to the {{MediaStreamTrack}}. If live samples are not made available to the {{MediaStreamTrack}} it is muted.

@@ -918,7 +918,8 @@

Media Flow

Whenever the [=User Agent=] initiates such a change, it MUST queue a task, using the user interaction task source, to [=set a track's muted state=] to the state desired by the user.

-

To set a track's muted state to +

To set a track's muted state to newState, the [=User Agent=] MUST run the following steps:

  1. From 1130538e33cfcf557efad8161b9d46a029cebfc0 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 10:54:46 -0500 Subject: [PATCH 02/12] s/data-dfn-for/for/ --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index abce691e..39858a45 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -897,7 +897,7 @@

    Media Flow

    There are two dimensions related to the media flow for a {{MediaStreamTrackState/"live"}} {{MediaStreamTrack}} : muted / not muted, and enabled / disabled.

    -

    Muted refers to the input to the {{MediaStreamTrack}}. If live samples are not made available to the {{MediaStreamTrack}} it is muted.

    From 39c1412e1c63b9b65fd5e4f8f123b5fc03797a82 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 10:55:14 -0500 Subject: [PATCH 03/12] s/data-dfn-for/for/ --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 39858a45..35704a03 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -918,7 +918,7 @@

    Media Flow

    Whenever the [=User Agent=] initiates such a change, it MUST queue a task, using the user interaction task source, to [=set a track's muted state=] to the state desired by the user.

    -

    To To set a track's muted state to newState, the [=User Agent=] MUST run the following steps:

      From 9f045ee6cd7efe5c855d76ee8d05dcf0a6b266a2 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 11:02:11 -0500 Subject: [PATCH 04/12] take 3 --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 35704a03..533bdf97 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -897,7 +897,7 @@

      Media Flow

      There are two dimensions related to the media flow for a {{MediaStreamTrackState/"live"}} {{MediaStreamTrack}} : muted / not muted, and enabled / disabled.

      -

      Muted refers to the input to the {{MediaStreamTrack}}. If live samples are not made available to the {{MediaStreamTrack}} it is muted.

      From 61cfeae950c25510371db0779a3d09dead0fcbda Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 11:02:27 -0500 Subject: [PATCH 05/12] take 3 --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 533bdf97..f83d497b 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -918,7 +918,7 @@

      Media Flow

      Whenever the [=User Agent=] initiates such a change, it MUST queue a task, using the user interaction task source, to [=set a track's muted state=] to the state desired by the user.

      -

      To To set a track's muted state to newState, the [=User Agent=] MUST run the following steps:

        From 7b87cc87990d24fa2dfb875caef1ccbcd5d16414 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 11:11:04 -0500 Subject: [PATCH 06/12] take 4 --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index f83d497b..e482779b 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -897,7 +897,7 @@

        Media Flow

        There are two dimensions related to the media flow for a {{MediaStreamTrackState/"live"}} {{MediaStreamTrack}} : muted / not muted, and enabled / disabled.

        -

        Muted refers to the input to the {{MediaStreamTrack}}. If live samples are not made available to the {{MediaStreamTrack}} it is muted.

        From 87c97a4a3c2a66b38e6c950c7d045af7c875002f Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 8 Feb 2024 11:11:13 -0500 Subject: [PATCH 07/12] take 4 --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index e482779b..d992f616 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -918,7 +918,7 @@

        Media Flow

        Whenever the [=User Agent=] initiates such a change, it MUST queue a task, using the user interaction task source, to [=set a track's muted state=] to the state desired by the user.

        -

        To To set a track's muted state to newState, the [=User Agent=] MUST run the following steps:

          From b3cd622539cf95858a0e017de23e29bab8235ac6 Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Mon, 25 Mar 2024 10:36:23 +0100 Subject: [PATCH 08/12] Fix export of muted state for mediastreamtrack Also creates (unexported) definition for muted source --- getusermedia.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index be80ac47..45379fc8 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -640,7 +640,7 @@

          {{MediaStreamTrack}}

        1. [[\Muted]], initialized to true if source is - [= muted =], and false otherwise.

          + [= source/muted =], and false otherwise.

        2. Life-cycle

          In the live state, the track is active and media is available for use by consumers (but may be replaced by zero-information-content if the {{MediaStreamTrack}} is - [= muted =] or [= enabled | disabled =], see below).

          + [= MediaStreamTrack/muted =] or [= enabled | disabled =], see below).

          A muted or disabled {{MediaStreamTrack}} renders either silence (audio), black frames (video), or a zero-information-content equivalent. For example, a video element @@ -787,23 +787,23 @@

          Life-cycle

          provided the UA sets it back to true as soon as any unstopped track connected to this device becomes un-muted or enabled again.

          -

          When a {{MediaStreamTrackState/"live"}}, [= track/muted | unmuted =], and +

          When a {{MediaStreamTrackState/"live"}}, [= MediaStreamTrack/muted | unmuted =], and [= track/enabled =] track sourced by a device exposed by {{MediaDevices/getUserMedia()}} becomes either - [= track/muted =] or [= track/enabled | disabled =], + [= MediaStreamTrack/muted =] or [= track/enabled | disabled =], and this brings all tracks connected to the device (across all [=navigables=] the user agent operates) to be either muted, disabled, or stopped, then the UA SHOULD relinquish the device within 3 seconds while allowing time for a reasonably-observant user to become aware of the transition. The UA SHOULD attempt to reacquire the device as soon as any live track sourced by the device - becomes both [= track/muted | unmuted =] and + becomes both [= MediaStreamTrack/muted | unmuted =] and [= track/enabled =] again, provided that track's [=relevant global object=]'s [=associated `Document`=] [=Document/is in view=] at that time. If the document is not [=Document/is in view|in view=] at that time, - the UA SHOULD instead queue a task to mute the - track, and not queue a task to unmute it until + the UA SHOULD instead queue a task to [=MediaStreamTrack/muted|mute=] the + track, and not queue a task to [=MediaStreamTrack/muted|unmute=] it until the document comes [=Document/is in view|into view=]. If reacquiring the device fails, the UA MUST [= track ended by the User agent | end the track =] (The UA MAY end it earlier @@ -824,8 +824,8 @@

          Life-cycle

          its consumers). Hence, media from the source only flows when a {{MediaStreamTrack}} object is both unmuted and enabled.

          -

          A {{MediaStreamTrack}} is [= track/muted =] - when the source is temporarily unable to +

          A {{MediaStreamTrack}} is [= MediaStreamTrack/muted =] + when the source is muted, i.e. temporarily unable to provide the track with data. A track can be muted by a user. Often this action is outside the control of the application. This could be as a result of the user hitting a hardware switch or toggling a control in @@ -901,15 +901,15 @@

          Media Flow

          There are two dimensions related to the media flow for a {{MediaStreamTrackState/"live"}} {{MediaStreamTrack}} : muted / not muted, and enabled / disabled.

          -

          Muted refers to the input to the {{MediaStreamTrack}}. Live samples MUST NOT be made available to a - {{MediaStreamTrack}} while it is [=muted=].

          -

          {{Muted}} is outside the control of web applications, but can be observed by + {{MediaStreamTrack}} while it is [=MediaStreamTrack/muted=].

          +

          The [=MediaStreamTrack/muted=] state is outside the control of web applications, but can be observed by the application by reading the {{MediaStreamTrack/muted}} attribute and listening to the associated events {{mute}} and {{unmute}}. The reasons for a {{MediaStreamTrack}} to be muted are defined by its source.

          -

          For camera and microphone sources, the reasons to [=muted|mute=] are +

          For camera and microphone sources, the reasons to [=source/muted|mute=] are [=implementation-defined=]. This allows user agents to implement privacy mitigations in situations like: the user pushing a physical mute button on the microphone, the user @@ -924,11 +924,11 @@

          Media Flow

          Whenever the [=User Agent=] initiates such an [= implementation-defined=] change for camera or microphone sources, it MUST queue a - task, using the user interaction task source, to [=set a track's muted + task, using the user interaction task source, to [=MediaStreamTrack/set a track's muted state=] to the state desired by the user.

          This does not apply to [=source|sources=] defined in other specifications. Other specifications need to define their own steps - to [=set a track's muted state=] if desired.
          + to [=MediaStreamTrack/set a track's muted state=] if desired.

          To set a track's muted state to newState, the [=User Agent=] MUST run the following steps:

          @@ -1051,7 +1051,7 @@

          Attributes

          {{muted}} of type {{boolean}}, readonly

          The muted attribute - reflects whether the track is [= track/muted =]. It MUST return + reflects whether the track is [= MediaStreamTrack/muted =]. It MUST return [=this=].{{MediaStreamTrack/[[Muted]]}}.

          onmute of type {{EventHandler}}
          @@ -3231,7 +3231,7 @@

          Context capturing state

          run the following sub steps:

          1. -

            If source is [=source/stopped=] or [=muted=], abort these steps.

            +

            If source is [=source/stopped=] or [=source/muted=], abort these steps.

          2. Let deviceId be source's device's deviceId.

            @@ -4160,7 +4160,7 @@

            Implementation Suggestions

            Device muting initiated by [=User Agent=]

            A track sourced by a camera or microphone may be - forcibly [= track/muted =] by a [=User Agent=] at any time, in order + forcibly [= MediaStreamTrack/muted =] by a [=User Agent=] at any time, in order to manage a user's privacy. However, doing so may create web compatibility issues, as well as leak information about user activity, so caution is advised. @@ -4189,8 +4189,8 @@

            Implementation Suggestions

          3. Best practice is to - [= muted | unmute =] a camera or microphone track it previously - [= muted =], in the following instances:

            + [= MediaStreamTrack/muted | unmute =] a camera or microphone track it previously + [= MediaStreamTrack/muted =], in the following instances:

            • An OS-level event for which the [=User Agent=] already resumes media @@ -4202,7 +4202,7 @@

              Implementation Suggestions

            • A web page comes [=Document/is in view|into view=] and has one or more enabled tracks that are also - [= muted =]. + [= MediaStreamTrack/muted =].

            @@ -5786,7 +5786,7 @@

            Defining a new source of {{MediaStreamTrack}}

            {{MediaStreamTrack/kind}} of media this new source produces, and how they work with this source, -
          4. describe how and when to [=set a track's muted state=] for this +
          5. describe how and when to [=MediaStreamTrack/set a track's muted state=] for this source,
          6. describe how and when to end tracks From 66d0801861754c51e84f55ec9661767a138a6368 Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Mon, 25 Mar 2024 10:46:32 +0100 Subject: [PATCH 09/12] Align dfn of ended with muted --- getusermedia.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index 45379fc8..6961688c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -299,14 +299,14 @@

            {{MediaStream}}

            consumer.

            A {{MediaStream}} object is said to be active when it has at least one - {{MediaStreamTrack}} that has not [= track/ended =]. A {{MediaStream}} that does not - have any tracks or only has tracks that are [= track/ended =] + {{MediaStreamTrack}} that has not [= MediaStreamTrack/ended =]. A {{MediaStream}} that does not + have any tracks or only has tracks that are [= MediaStreamTrack/ended =] is inactive.

            A {{MediaStream}} object is said to be audible when it has at least one {{MediaStreamTrack}} whose {{MediaStreamTrack/[[Kind]]}} is "audio" - that has not [= track/ended =]. A {{MediaStream}} that does not have any - audio tracks or only has audio tracks that are [= track/ended =] is + that has not [= MediaStreamTrack/ended =]. A {{MediaStream}} that does not have any + audio tracks or only has audio tracks that are [= MediaStreamTrack/ended =] is inaudible.

            The [=User Agent=] may update a {{MediaStream}}'s [=track set=] in response to, for example, an external event. This specification does not specify any such cases, but other @@ -845,15 +845,15 @@

            Life-cycle

            end when the source of the track is disconnected or exhausted.

            If all {{MediaStreamTrack}}s that are using the same - source are [= track/ended =], the source will be + source are [= MediaStreamTrack/ended =], the source will be [= source/stopped =].

            After the application has invoked the {{MediaStreamTrack/stop()}} method on a {{MediaStreamTrack}} object, or once the [=source=] of a {{MediaStreamTrack}} permanently ends production of live samples to its tracks, whichever is sooner, a {{MediaStreamTrack}} is said to be - ended.

            + ended.

            For camera and microphone sources, the reasons for a source to - [=track/ended|end=] besides {{MediaStreamTrack/stop()}} are + [=MediaStreamTrack/ended|end=] besides {{MediaStreamTrack/stop()}} are [=implementation-defined=] (e.g., because the user rescinds the permission for the page to use the local camera, or because the User @@ -874,7 +874,7 @@

            Life-cycle

          7. Notify track's {{MediaStreamTrack/[[Source]]}} that track is - [= track/ended =] so that the source may be [= source/stopped =], unless other + [= MediaStreamTrack/ended =] so that the source may be [= source/stopped =], unless other {{MediaStreamTrack}} objects depend on it.

          8. @@ -955,7 +955,7 @@

            Media Flow

            track.

          -

          Enabled/disabled on the other hand is +

          Enabled/disabled on the other hand is available to the application to control (and observe) via the {{MediaStreamTrack/enabled}} attribute.

          @@ -1044,7 +1044,7 @@

          Attributes

          [=this=].{{MediaStreamTrack/[[Enabled]]}} MUST be set to the new value.

          Thus, after a - {{MediaStreamTrack}} has [= track/ended =], its {{MediaStreaMtrack/enabled}} attribute + {{MediaStreamTrack}} has [= MediaStreamTrack/ended =], its {{MediaStreaMtrack/enabled}} attribute still changes value when set; it just doesn't do anything with that new value.

          @@ -1098,7 +1098,7 @@

          Methods

        3. Notify track's source that track - is [= track/ended =].

          + is [= MediaStreamTrack/ended =].

          A source that is notified of a track ending will be [= source/stopped =], unless other {{MediaStreamTrack}} objects depend on @@ -1242,7 +1242,7 @@

          Methods

          ended -

          The track has [= track/ended =] (the +

          The track has [= MediaStreamTrack/ended =] (the track's underlying media source is no longer providing data, and will never provide more data for this track). Once a track enters this state, it never exits it.

          From c198b10daffa9c55286c6e6e1a281c004eb0b9bc Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Mon, 25 Mar 2024 10:49:06 +0100 Subject: [PATCH 10/12] Align dfn of enabled with muted --- getusermedia.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index 6961688c..560458a1 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -771,7 +771,7 @@

          Life-cycle

          In the live state, the track is active and media is available for use by consumers (but may be replaced by zero-information-content if the {{MediaStreamTrack}} is - [= MediaStreamTrack/muted =] or [= enabled | disabled =], see below).

          + [= MediaStreamTrack/muted =] or [= MediaStreamTrack/enabled | disabled =], see below).

          A muted or disabled {{MediaStreamTrack}} renders either silence (audio), black frames (video), or a zero-information-content equivalent. For example, a video element @@ -788,9 +788,9 @@

          Life-cycle

          unstopped track connected to this device becomes un-muted or enabled again.

          When a {{MediaStreamTrackState/"live"}}, [= MediaStreamTrack/muted | unmuted =], and - [= track/enabled =] track sourced by a device exposed + [= MediaStreamTrack/enabled =] track sourced by a device exposed by {{MediaDevices/getUserMedia()}} becomes either - [= MediaStreamTrack/muted =] or [= track/enabled | disabled =], + [= MediaStreamTrack/muted =] or [= MediaStreamTrack/enabled | disabled =], and this brings all tracks connected to the device (across all [=navigables=] the user agent operates) to be either muted, disabled, or stopped, then the UA SHOULD relinquish the device @@ -798,7 +798,7 @@

          Life-cycle

          become aware of the transition. The UA SHOULD attempt to reacquire the device as soon as any live track sourced by the device becomes both [= MediaStreamTrack/muted | unmuted =] and - [= track/enabled =] again, provided that track's + [= MediaStreamTrack/enabled =] again, provided that track's [=relevant global object=]'s [=associated `Document`=] [=Document/is in view=] at that time. If the document is not [=Document/is in view|in view=] at that time, @@ -831,7 +831,7 @@

          Life-cycle

          result of the user hitting a hardware switch or toggling a control in the operating system / [=User Agent=] chrome. A track can also be muted by the [=User Agent=].

          -

          Applications are able to [= track/enabled | enable =] or +

          Applications are able to [= MediaStreamTrack/enabled | enable =] or disable a {{MediaStreamTrack}} to prevent it from rendering media from the source. A muted track will however, regardless of the enabled state, render silence and blackness. A disabled track is @@ -1037,14 +1037,14 @@

          Attributes

          The enabled - attribute controls the [= track/enabled =] state for the object.

          + attribute controls the [= MediaStreamTrack/enabled =] state for the object.

          On getting, [=this=].{{MediaStreamTrack/[[Enabled]]}} MUST be returned. On setting, [=this=].{{MediaStreamTrack/[[Enabled]]}} MUST be set to the new value.

          Thus, after a - {{MediaStreamTrack}} has [= MediaStreamTrack/ended =], its {{MediaStreaMtrack/enabled}} attribute + {{MediaStreamTrack}} has [= MediaStreamTrack/ended =], its {{MediaStreamTrack/enabled}} attribute still changes value when set; it just doesn't do anything with that new value.

          @@ -4182,8 +4182,8 @@

          Implementation Suggestions

        4. A web page not [=Document/is in view|in view=] - re-enables a track when all tracks from that - source are disabled, in order to delay + [=MediaStreamTrack/enabled|re-enables=] a track when all tracks from that + source are [=MediaStreamTrack/enabled|disabled=], in order to delay resumption of capture until the page [=Document/is in view=].

        5. @@ -4201,7 +4201,7 @@

          Implementation Suggestions

        6. A web page comes [=Document/is in view|into view=] and - has one or more enabled tracks that are also + has one or more [=MediaStreamTrack/enabled=] tracks that are also [= MediaStreamTrack/muted =].

        7. From 531f4f801d3b9f8782bd471d08ac8ad8d6e0d65b Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Mon, 15 Apr 2024 09:56:57 +0200 Subject: [PATCH 11/12] remove unneeded space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 560458a1..8ff3c91c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -299,7 +299,7 @@

          {{MediaStream}}

          consumer.

          A {{MediaStream}} object is said to be active when it has at least one - {{MediaStreamTrack}} that has not [= MediaStreamTrack/ended =]. A {{MediaStream}} that does not + {{MediaStreamTrack}} that has not [=MediaStreamTrack/ended=]. A {{MediaStream}} that does not have any tracks or only has tracks that are [= MediaStreamTrack/ended =] is inactive.

          A {{MediaStream}} object is said to be Date: Mon, 22 Apr 2024 12:06:03 +0200 Subject: [PATCH 12/12] remove unneeded whtiespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- getusermedia.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index 8ff3c91c..3e5db5ff 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -305,8 +305,8 @@

          {{MediaStream}}

          A {{MediaStream}} object is said to be audible when it has at least one {{MediaStreamTrack}} whose {{MediaStreamTrack/[[Kind]]}} is "audio" - that has not [= MediaStreamTrack/ended =]. A {{MediaStream}} that does not have any - audio tracks or only has audio tracks that are [= MediaStreamTrack/ended =] is + that has not [=MediaStreamTrack/ended=]. A {{MediaStream}} that does not have any + audio tracks or only has audio tracks that are [=MediaStreamTrack/ended=] is inaudible.

          The [=User Agent=] may update a {{MediaStream}}'s [=track set=] in response to, for example, an external event. This specification does not specify any such cases, but other