Skip to content

Commit

Permalink
Merge pull request #701 from jan-ivar/iomutebestpractice
Browse files Browse the repository at this point in the history
Add best practice on device muting.
  • Loading branch information
henbos committed Jul 2, 2020
2 parents 9abe7b2 + 9726c85 commit a6b72a1
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions getusermedia.html
Expand Up @@ -3822,6 +3822,57 @@ <h2>Implementation Suggestions</h2>
based on the User Agent's partitioning rules, retiring the number that
hasn't been seen the longest if numbers run out.</p>
</div>
<div class="practice">
<span class="practicelab" id="muting-devices">Device muting initiated by user agent</span>
<p class="practicedesc">A track sourced by a camera or microphone may be
forcibly <a data-lt=muted>muted</a> 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.
</p>
<p class="practicedesc">Best practice is to
<a data-lt=muted>mute</a> a camera or microphone track in the following
instances:</p>
<ul>
<li>
<p>An OS-level event for which the user agent already suspends media
playback globally, but JavaScript is not suspended. The rationale is
users may otherwise be surprised if capture were to continue in this
situation (unless they've intentionally configured it this way).
If the OS-level event already causes frames to stop coming in
on the track, then no new information of user activity is revealed
by this. Even when this is not the case, revealing that capture is
ending seems like a reasonable privacy tradeoff compared to
continuing capture in situations that may surprise users.</p>
</li>
<li>
<p>A web page <a data-cite="!HTML/#gains-focus">without focus</a>
<a data-lt=enabled>re-enables</a> a track when all tracks from that
source are <a data-lt=enabled>disabled</a>, in order to delay
resumption of capture until the page
<a data-cite="!HTML/#gains-focus">gains focus</a>.
</p>
</li>
</ul>
<p class="practicedesc">Best practice is to
<a data-lt=muted>unmute</a> a camera or microphone track it previously
<a data-lt=muted>muted</a>, in the following instances:</p>
<ul>
<li>
<p>An OS-level event for which the user agent already resumes media
playback globally, <em>and</em> the page is visible to the user
(e.g. not during a lock screen). User agents may defer such action
if it determines significant time has passed that may jeopardize a
user's awareness of the earlier capture session.</p>
</li>
<li>
<p>A web page <a data-cite="!HTML/#gains-focus">gains focus</a> and
has one or more <a data-lt=enabled>enabled</a> tracks that are also
<a data-lt=muted>muted</a>.
</p>
</li>
</ul>
</div>
</section>
</section>
<section id="constrainable-interface">
Expand Down

0 comments on commit a6b72a1

Please sign in to comment.