forked from w3c/ambient-light
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mandate that illuminance readings be rounded; require threshold value…
… check. Related to w3c#63, which says the granularity of the data exposed by Ambient Light Sensors should be specified normatively. This commit goes a bit further and specifies the two anti-fingerprinting measures currently implemented by Chrome -- namely, not only are illuminance values rounded but there's also a threshold value check to avoid storing values that are too close to the latest reading (and both are necessary). We first define a few values: - An "illuminance threshold value" of at least 50lx. - An "illuminance rounding multiple" of at least 50lx. These values are then used in the following algorithms: - The "threshold check algorithm" checks that the difference between new and current illuminance values is above the illuminance threshold value. - `AmbientLightSensor.illuminance`'s getter returns values that are rounded to the closest multiple of the illuminance rounding multiple.
- Loading branch information
Raphael Kubo da Costa
committed
Dec 15, 2021
1 parent
b91297a
commit 1d1ad4d
Showing
1 changed file
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters