Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define getMuteReasons() #979

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,12 @@ <h2>{{MediaStreamTrack}}</h2>
initialized to <code>true</code> if <var>source</var> is
[= muted =], and <code>false</code> otherwise.</p>
</li>
<li>
<p><dfn>[[\MuteReasons]]</dfn></p>
<p>
TODO: Decide whether this replaces {{MediaStreamTrack/[[Muted]]}}
or goes alongside it.
</p>
<li>
<a data-link-for="constrainable object"
data-link-type="attribute">[[\Capabilities]]</a>,
Expand Down Expand Up @@ -999,6 +1005,7 @@ <h3>Interface Definition</h3>
undefined stop();
MediaTrackCapabilities getCapabilities();
MediaTrackConstraints getConstraints();
sequence&lt;MuteReason&gt; getMuteReasons();
MediaTrackSettings getSettings();
Promise&lt;undefined&gt; applyConstraints(optional MediaTrackConstraints constraints = {});
};</pre>
Expand Down Expand Up @@ -1114,6 +1121,26 @@ <h2>Methods</h2>
<p>See <a href="#constrainable-interface">ConstrainablePattern
Interface</a> for the definition of this method.</p>
</dd>
<dt><dfn>getMuteReasons</dfn></dt>
<dd>
<p>When a {{MediaStreamTrack}} object's {{MediaStreamTrack.getMuteReasons()}} method is invoked,
the [=User Agent=] MUST run following steps:</p>
<ol class="algorithm">
<li>
<p>Let <var>track</var> be the current {{MediaStreamTrack}} object.</p>
</li>
<li>
<p>If <var>track</var>'s {{MediaStreamTrack/[[ReadyState]]}}
is {{MediaStreamTrackState/"ended"}}, return an empty sequence.
</p>
</li>
<li>
<p>
Return <var>track</var>.{{MediaStreamTrack/[[MuteReasons]]}}.
</p>
</li>
</ol>
</dd>
<dt><dfn>getSettings</dfn></dt>
<dd>
<p>When a {{MediaStreamTrack}} object's {{MediaStreamTrack.getSettings()}} method is invoked,
Expand Down Expand Up @@ -1588,6 +1615,46 @@ <h2>Dictionary {{MediaTrackConstraintSet}}
</section>
</div>
</section>
<section id="mute-reason">
<h2><dfn>MuteReason</dfn></h2>
<p>
{{MuteReason}} represents information about why a {{MediaStreamTrack}}
is [=muted=]. Multiple reasons might apply concurrently. The information
exposed to applications might depend on certain conditions.
</p>
<div>
<pre class="idl">
[Exposed=Window]
interface MuteReason {
readonly attribute boolean explicitUpstream;
};
</pre>
<section>
<h2>{{MuteReason}} Members</h2>
<dl data-link-for="MuteReason" data-dfn-for="MuteReason" class="attributes">
<dt><dfn>explicitUpstream</dfn> of type {{boolean}}</dt>
<dd>
<p>
<code>true</code> if the reason is an explicit decision to mute by an upstream
entity such as the user agent, operating system or hardware.
</p>
<p>
<code>false</code> if the reason is anything else, such as an error
or a temporary absence of media for any reason.
</p>
</dd>
</dl>
</section>
</div>
<div class="note">
<p>
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 <code>"user-agent"</code>, <code>"operating-system"</code>,
<code>"hardware"</code> and <code>"unspecified"</code>.
</p>
</div>
</section>
<section id="media-track-settings">
<h2><dfn>MediaTrackSettings</dfn></h2>
<p>{{MediaTrackSettings}} represents the
Expand Down