Skip to content

Commit

Permalink
Add clarification on ended as well as mute
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ivar committed Feb 15, 2024
1 parent eb0513b commit cfa9807
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,17 @@ <h4>Life-cycle</h4>
<p>If all {{MediaStreamTrack}}s that are using the same
source are [= track/ended =], the source will be
[= source/stopped =].</p>
<p>When a {{MediaStreamTrack}} object ends for any
reason (e.g., because the user rescinds the permission for the page to
use the local camera, or because the application invoked the
{{MediaStreamTrack/stop()}} method on
the {{MediaStreamTrack}} object, or because the User
Agent has instructed the track to end for any reason) it is said to be
<p>When the application has invoked the {{MediaStreamTrack/stop()}}
method on a {{MediaStreamTrack}} object, or when the [=source=] of a
{{MediaStreamTrack}} ends production of live samples to its tracks,
whichever is sooner, a {{MediaStreamTrack}} is said to be
<dfn id="track-ended" data-dfn-for="track" data-export>ended</dfn>.</p>
<p>For camera and microphone sources, the reasons for a source to end
[=ended|end=] its tracks for reasons other than
{{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
Agent has instructed the track to end for any reason).</p>
<p>When a {{MediaStreamTrack}} <var>track</var>
<dfn data-lt="track ended by the User agent" data-for=MediaStreamTrack data-export id="ends-nostop">ends for any reason other than the {{MediaStreamTrack/stop()}} method being
invoked</dfn>, the [=User Agent=] MUST queue a task that runs the following
Expand Down Expand Up @@ -899,14 +903,15 @@ <h4>Media Flow</h4>
muted, and enabled / disabled.</p>
<p><dfn data-export id=
"track-muted">Muted</dfn> refers to the input to the
{{MediaStreamTrack}}. If live samples are not made
available to the {{MediaStreamTrack}} it is muted.</p>
{{MediaStreamTrack}}. Live samples MUST NOT be made available to a
{{MediaStreamTrack}} while it is [=muted=].</p>
<p>{{Muted}} 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 <a>source</a>.</p>
<p>For camera and microphone sources, there can be
several reasons for a {{MediaStreamTrack}} to be muted:
<p>For camera and microphone sources, the reasons to [=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
closing a laptop lid with an embedded camera, the user toggling a
control in the operating system, the user clicking a mute button in the
Expand All @@ -917,9 +922,13 @@ <h4>Media Flow</h4>
this information to the web application through {{MediaStreamTrack/muted}} and
its associated events.</p>

<p>Whenever the [=User Agent=] initiates such a change, it MUST queue a
<p>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
state=] to the state desired by the user.</p>
<div class="note">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.</div>
<p>To <dfn class="abstract-op" id="set-track-muted">set a track's muted state</dfn> to
<var>newState</var>, the [=User Agent=] MUST run the following steps:</p>
<ol class="algorithm">
Expand Down

0 comments on commit cfa9807

Please sign in to comment.