Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control screen brightness 🔆 #623

Open
beaufortfrancois opened this issue Mar 22, 2022 · 6 comments
Open

Control screen brightness 🔆 #623

beaufortfrancois opened this issue Mar 22, 2022 · 6 comments

Comments

@beaufortfrancois
Copy link

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:

  • Screen extension: await screen.requestBrightnessIncrease();
  • Screen Wake Lock integration: await navigator.wakeLock.request({ increaseBrightness: true });
  • navigator.screenBrightness
  • and more.

We would really appreciate Mozilla's folks reviewing this document and possibly providing alternative solutions.

@annevk
Copy link
Contributor

annevk commented Apr 6, 2022

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

@martinthomson
Copy link
Member

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

@annevk
Copy link
Contributor

annevk commented Apr 6, 2022

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

@anssiko
Copy link

anssiko commented Apr 19, 2022

@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 w3c/ambient-light#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

@anssiko
Copy link

anssiko commented Jun 6, 2022

@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, w3c/ambient-light#77 has been updated in part thanks to your feedback here.

@beaufortfrancois
Copy link
Author

FYI We're currently discussing this screen brightness 🔆 proposal with WebKit folks at WebKit/standards-positions#19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Unscreened
Development

No branches or pull requests

4 participants