Skip to content

Commit

Permalink
Merge pull request #766 from jan-ivar/unfit
Browse files Browse the repository at this point in the history
Fitness distance for bool placeholder & constraints not supported by device.
  • Loading branch information
henbos authored Jan 28, 2021
2 parents 0114a3f + 8f5f129 commit 6b782b5
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,14 @@ <h2>Methods</h2>
<li>
<a>settings dictionary</a> refers to a possible
instance of the {{MediaTrackSettings}}
dictionary.
dictionary. The User Agent MUST NOT include inherent
unchangeable device properties as members unless
they are in the <a>list of inherent constrainable
track properties</a>, or otherwise include
device properties that <dfn>must not be exposed</dfn>.
<p class="note">Other specifications may define
constrainable properties that at times <a>must not
be exposed</a>.</p>
</li>
</ul>
</li>
Expand Down Expand Up @@ -4234,14 +4241,27 @@ <h2>Methods</h2>
either contains one or more members named 'min', 'max', or
'exact', or is itself a bare value and bare values are to be
treated as 'exact'), and the <a>settings dictionary</a>'s
value for the constraint does not satisfy the constraint, the
fitness distance is positive infinity.</p>
<var>constraintName</var> member's value does not satisfy the
constraint or doesn't [= map/exist =], the fitness distance is
positive infinity.</p>
</li>
<li>
<p>If the constraint is
<a data-lt="required">not required</a>, and does not apply for
this type of device, the fitness distance is 0 (that is, the
constraint does not influence the fitness distance).</p>
<p>If the constraint does not apply for this type of object,
the fitness distance is 0 (that is, the constraint does not
influence the fitness distance).</p>
</li>
<li>
<p>If <var>constraintValue</var> is a boolean, but the
constrainable property is not, then the fitness distance is
based on whether the <a>settings dictionary</a>'s
<var>constraintName</var> member [= map/exist | exists =] or
not, from the formula
<pre>(constraintValue == exists) ? 0 : 1</pre>
</li>
<li>
<p>If the <a>settings dictionary</a>'s <var>constraintName</var>
member does [= map/exist | not exist=], the fitness distance
is 1.</p>
</li>
<li>If no ideal value is specified (<var>constraintValue</var>
either contains no member named 'ideal', or, if bare values are
Expand Down

0 comments on commit 6b782b5

Please sign in to comment.