From 098d6d0b5c16a042a14bb857d902cf61a40aad78 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 14:56:49 -0500 Subject: [PATCH 1/7] Define fitness distance for constraints not supported by a device. --- getusermedia.html | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index bcb9825b..734de726 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -1107,7 +1107,11 @@

Methods

  • settings dictionary 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 list of inherent constrainable + track properties (to avoid a "broken clock being + right twice a day" problem).
  • @@ -4234,15 +4238,24 @@

    Methods

    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.

    + constraintName member does not [= map/exist =], or + its value does not satisfy the constraint, the fitness + distance is positive infinity.

  • If the constraint is not required, and does not apply for - this type of device, the fitness distance is 0 (that is, the + this type of object, the fitness distance is 0 (that is, the constraint does not influence the fitness distance).

  • +
  • +

    If the constraint is + not required, applies for this type + of object (but not necessarily this specific instance), and + the settings dictionary's constraintName + member does [= map/exist | not exist=], the fitness distance + is 1.

    +
  • 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 From 2596c40983591446491b0a4c57fedfed7bc40133 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 15:24:03 -0500 Subject: [PATCH 2/7] Add "must not be exposed" hook. --- getusermedia.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index 734de726..937901ec 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -1111,7 +1111,11 @@

    Methods

    unchangeable device properties as members unless they are in the list of inherent constrainable track properties (to avoid a "broken clock being - right twice a day" problem). + right twice a day" problem), or otherwise include + device properties that must not be exposed. +

    Other specifications may define + constrainable properties that at times must not + be exposed.

  • From 28820c799a8c2219382227a7c6ae7864e933dfeb Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 16:57:56 -0500 Subject: [PATCH 3/7] Simplify fitness algorithm by relying on sequence order. --- getusermedia.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index 937901ec..f600cacf 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -4247,16 +4247,12 @@

    Methods

    distance is positive infinity.

  • -

    If the constraint is - not required, and does not apply for - this type of object, the fitness distance is 0 (that is, the - constraint does not influence the fitness distance).

    +

    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).

  • -

    If the constraint is - not required, applies for this type - of object (but not necessarily this specific instance), and - the settings dictionary's constraintName +

    If the settings dictionary's constraintName member does [= map/exist | not exist=], the fitness distance is 1.

  • From af31bba88e4f6d51be7683d22aa0dc5c8bd29679 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 17:18:28 -0500 Subject: [PATCH 4/7] Improve wording. --- getusermedia.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index f600cacf..bf79fbc7 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -4242,9 +4242,9 @@

    Methods

    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 - constraintName member does not [= map/exist =], or - its value does not satisfy the constraint, the fitness - distance is positive infinity.

    + constraintName member's value does not satisfy the + constraint or doesn't [= map/exist =], the fitness distance is + positive infinity.

  • If the constraint does not apply for this type of object, From 4a1fa6b860f729a469c3d5bdc62a95333e23e094 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 17:20:11 -0500 Subject: [PATCH 5/7] Gift to imageCapture. --- getusermedia.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/getusermedia.html b/getusermedia.html index bf79fbc7..edd08f48 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -4251,6 +4251,14 @@

    Methods

    the fitness distance is 0 (that is, the constraint does not influence the fitness distance).

  • +
  • +

    If constraintValue is boolean, but the + constrainable property is not, then the fitness distance is + based on whether the settings dictionary's + constraintName member [= map/exist | exists =] or + not, from the formula +

    (constraintValue == exists) ? 0 : 1
    +
  • If the settings dictionary's constraintName member does [= map/exist | not exist=], the fitness distance From 1af883f342af6c48acc62cec8838a20ad2febb7a Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 14 Jan 2021 19:45:09 -0500 Subject: [PATCH 6/7] typo --- getusermedia.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getusermedia.html b/getusermedia.html index edd08f48..dd214f6c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -4252,7 +4252,7 @@

    Methods

    influence the fitness distance).

  • -

    If constraintValue is boolean, but the +

    If constraintValue is a boolean, but the constrainable property is not, then the fitness distance is based on whether the settings dictionary's constraintName member [= map/exist | exists =] or From 8f5f129ac38b441b5795ebfc164c32c186012614 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Tue, 19 Jan 2021 13:51:58 -0500 Subject: [PATCH 7/7] Update getusermedia.html --- getusermedia.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/getusermedia.html b/getusermedia.html index dd214f6c..a0df115c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -1110,8 +1110,7 @@

    Methods

    dictionary. The User Agent MUST NOT include inherent unchangeable device properties as members unless they are in the list of inherent constrainable - track properties (to avoid a "broken clock being - right twice a day" problem), or otherwise include + track properties, or otherwise include device properties that must not be exposed.

    Other specifications may define constrainable properties that at times must not