Skip to content

Commit

Permalink
Define the fitness distance for all required constrains.
Browse files Browse the repository at this point in the history
This CL defines the fitness distance also for required constrains whose
value contains a member named 'ideal' in addition to members named
'exact', 'max' and/or 'min'.
  • Loading branch information
eehakkin committed Sep 7, 2020
1 parent 25c2d8e commit 969ce69
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -4271,15 +4271,13 @@ <h2>Methods</h2>
either contains no member named 'ideal', or, if bare values are
to be treated as 'ideal', isn't a bare value), the fitness
distance is 0.</li>
<li>For all positive numeric
<a data-lt="required">non-required</a> constraints (such as
<li>For all positive numeric constraints (such as
height, width, frameRate, aspectRatio, sampleRate and
sampleSize), the fitness distance is the result of the formula
<pre>
(actual == ideal) ? 0 : |actual - ideal| / max(|actual|, |ideal|)</pre>
</li>
<li>For all string and enum
<a data-lt="required">non-required</a> constraints (e.g.
<li>For all string and enum constraints (e.g.
deviceId, groupId, facingMode, resizeMode, echoCancellation),
the fitness distance is the result of the formula
<pre>(actual == ideal) ? 0 : 1</pre>
Expand Down

0 comments on commit 969ce69

Please sign in to comment.