Skip to content

Commit

Permalink
Merge pull request #166 from adam-be/update-track-muted
Browse files Browse the repository at this point in the history
Add steps describing the procedure to update a track's muted state
  • Loading branch information
alvestrand committed Apr 30, 2015
2 parents 461a4e7 + 6466dc3 commit 4f1b581
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions getusermedia.html
Expand Up @@ -784,6 +784,33 @@ <h4>Media Flow</h4>
button in the browser chrome, the User Agent (on behalf of the user)
mutes, etc.</p>

<p>To <dfn id="update-track-muted">update a track's muted state</dfn> to
<var>newState</var>, the user agent MUST queue a task to run the
following steps:</p>

<ol>
<li>
<p>Let <var>track</var> be the <code>MediaStreamTrack</code> in
question.</p>
</li>

<li>
<p>Set <var>track</var>'s <code>muted</code> attribute to
<var>newState</var>.</p>
</li>

<li>
<p>If <var>newState</var> is <code>true</code> let
<var>eventName</var> be <code>mute</code>, otherwise
<code>unmute</code>.</p>
</li>

<li>
<p>Fire a simple event named <var>eventName</var> on
<var>track</var>.</p>
</li>
</ol>

<p><dfn id="track-enabled">Enabled/disabled</dfn> on the other hand is
available to application to control (and observe) via the
<code><a href="#dom-mediastreamtrack-enabled">enabled</a></code>
Expand Down

0 comments on commit 4f1b581

Please sign in to comment.