diff --git a/getusermedia.html b/getusermedia.html index 169093cd..61390f79 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -4114,15 +4114,19 @@

Methods

value being compared against.

We define the fitness distance between a settings dictionary and a constraint set CS as - the sum, for each constraint provided for a constraint name in + the sum, for each member (represented by a + constraintName and constraintValue pair) + present in CS, of the following values:

  1. -

    If the constraint is not supported by the browser, the - fitness distance is 0.

    +

    If constraintName is not supported by the + browser, the fitness distance is 0.

  2. -

    If the constraint is required ('min', 'max', or 'exact'), +

    If the constraint is required (constraintValue 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 settings dictionary's value for the constraint does not satisfy the constraint, the fitness distance is positive infinity.

    @@ -4132,20 +4136,20 @@

    Methods

    this type of device, the fitness distance is 0 (that is, the constraint does not influence the fitness distance).

  3. -
  4. If no ideal value is specified, the fitness distance is - 0.
  5. +
  6. If no ideal value is specified (constraintValue + 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.
  7. For all positive numeric non-required constraints (such as height, width, frameRate, aspectRatio, sampleRate and sampleSize), the fitness distance is the result of the formula -
    (actual == ideal) ? 0 : |actual -
    -                  ideal|/max(|actual|,|ideal|)
    -
    +
    +(actual == ideal) ? 0 : |actual - ideal| / max(|actual|, |ideal|)
  8. For all string and enum non-required constraints (e.g. deviceId, groupId, facingMode, resizeMode, echoCancellation), the fitness distance is the result of the formula -
    (actual == ideal) ? 0 : 1
    -
    +
    (actual == ideal) ? 0 : 1

More definitions:

@@ -4185,7 +4189,7 @@

Methods

  • Each constraint specifies one or more values (or a range of values) for its property. A property MAY appear more than once in the list of 'advanced' - ConstraintSets. If an empty object or list has been given as + ConstraintSets. If an empty list has been given as the value for a constraint, it MUST be interpreted as if the constraint were not specified (in other words, an empty constraint == no constraint).