Open beaufortfrancois opened 2 years ago
Have you done an evaluation of how native platforms approach this? That might also help with figuring out how to address the open design issues.
In general a request for this, similar to wake lock, seems okay. I'd be inclined to not give apps the result of such a request though and end users should always be able to override or automatically ignore such requests (ideally without the apps knowing).
I agree with Anne about feedback and user control. I wonder whether there might be value in asking for a particular brightness target or asking for something by degrees (recent Macs do 1000 nits, which might be a little much).
(Another thing I thought of that is not really applicable to Firefox as we don't have plans to implement the various sensors, is that this might make https://blog.lukaszolejnik.com/stealing-sensitive-browser-data-with-the-w3c-ambient-light-sensor-api/ more performant.)
@annevk @martinthomson, thanks for your feedback. We will loop you in when we get to design discussions that touch the points you raised.
We expect https://github.com/w3c/ambient-light/pull/77 to mitigate the risk demonstrated by the proof of concept. The mitigation is already implemented in Chromium, but we felt it is important to specify this normatively to help future implementers. @rakuco
@beaufortfrancois please consider, where applicable, Mozillians feedback provided in this issue while working on the early experimental implementation (https://github.com/beaufortfrancois/screen-brightness) of one possible API shape.
Related, https://github.com/w3c/ambient-light/pull/77 has been updated in part thanks to your feedback here.
FYI We're currently discussing this screen brightness 🔆 proposal with WebKit folks at https://github.com/WebKit/standards-positions/issues/19.
Request for thoughts on the need to control screen brightness
Since 2018, the W3C Devices and Sensors Working Group has received significant requests from web developers surrounding the need to increase the brightness of a device's screen.
Multiple solutions have been proposed in https://github.com/w3c/screen-wake-lock/blob/gh-pages/brightness-mode-explainer.md:
await screen.requestBrightnessIncrease();
await navigator.wakeLock.request({ increaseBrightness: true });
navigator.screenBrightness
We would really appreciate Mozilla's folks reviewing this document and possibly providing alternative solutions.