From 7e990b683ee981e17c81d54a8dc1230ca8bac4dc Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Fri, 24 Nov 2023 13:43:15 +0100 Subject: [PATCH 1/2] Define getMuteReasons() --- getusermedia.html | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/getusermedia.html b/getusermedia.html index 0874d7d6..0a871199 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -642,6 +642,12 @@

{{MediaStreamTrack}}

initialized to true if source is [= muted =], and false otherwise.

+
  • +

    [[\MuteReasons]]

    +

    + TODO: Decide whether this replaces {{MediaStreamTrack/[[Muted]]}} + or goes alongside it. +

  • [[\Capabilities]], @@ -999,6 +1005,7 @@

    Interface Definition

    undefined stop(); MediaTrackCapabilities getCapabilities(); MediaTrackConstraints getConstraints(); + sequence<MuteReason> getMuteReasons(); MediaTrackSettings getSettings(); Promise<undefined> applyConstraints(optional MediaTrackConstraints constraints = {}); }; @@ -1114,6 +1121,26 @@

    Methods

    See ConstrainablePattern Interface for the definition of this method.

    +
    getMuteReasons
    +
    +

    When a {{MediaStreamTrack}} object's {{MediaStreamTrack.getMuteReasons()}} method is invoked, + the [=User Agent=] MUST run following steps:

    +
      +
    1. +

      Let track be the current {{MediaStreamTrack}} object.

      +
    2. +
    3. +

      If track's {{MediaStreamTrack/[[ReadyState]]}} + is {{MediaStreamTrackState/"ended"}}, return an empty sequence. +

      +
    4. +
    5. +

      + Return track.{{MediaStreamTrack/[[MuteReasons]]}}. +

      +
    6. +
    +
    getSettings

    When a {{MediaStreamTrack}} object's {{MediaStreamTrack.getSettings()}} method is invoked, @@ -1588,6 +1615,38 @@

    Dictionary {{MediaTrackConstraintSet}} +
    +

    MuteReason

    +

    + {{MuteReason}} represents information about why a {{MediaStreamTrack}} + is [=muted=]. Multiple reasons might apply concurrently. The information + exposed to applications might depend on certain conditions. +

    +
    +
    +            [Exposed=Window]
    +            interface MuteReason {
    +              readonly attribute boolean explicitUpstream;
    +            };
    +          
    +
    +

    {{MuteReason}} Members

    +
    +
    explicitUpstream of type {{boolean}}
    +
    +

    + true if the reason is an explicit decision to mute by an upstream + entity such as the user agent, operating system or hardware. +

    +

    + false if the reason is anything else, such as an error + or a temporary absence of media for an unspecified reason. +

    +
    +
    +
    +
    +

    MediaTrackSettings

    {{MediaTrackSettings}} represents the From 88ab7d04ecb0e3a314c61f1cee2666f2ed697cff Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Fri, 24 Nov 2023 14:15:13 +0100 Subject: [PATCH 2/2] Add note about source --- getusermedia.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 0a871199..45b04f86 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -1640,12 +1640,20 @@

    {{MuteReason}} Members

    false if the reason is anything else, such as an error - or a temporary absence of media for an unspecified reason. + or a temporary absence of media for any reason.

    +
    +

    + What additional information can be exposed, and under which conditions, + is actively debated. One proposal is to expose the MuteSource, with potential + values such as "user-agent", "operating-system", + "hardware" and "unspecified". +

    +

    MediaTrackSettings