Wake Lock API: Support for different display power modes


The current display technology of mobile phones consumes a lot of power. As a consequence future display technology will propably support more than the basic ON and OFF modes. Current smartwatches like the Sony Mobile SWR50 SmartWatch 3 already supports such a new display mode which Android can use in the so called “Ambient Mode”. This is some kind of passive mode which can save a lot of energy while displaying information in a low-power state of the display.

Ther are already some examples around the web showing good use cases for such “Always-Alive” apps making use of the so called “ambient mode”. I think that the Wake Lock API should take the low-power display mode of future display technologies into consideration.


I brought this up to the Device & Sensors Working Group where the current Wake Lock API is developed: https://github.com/w3c/wake-lock/issues/84

The editor of that spec gave some input on the idea that you might find interesting / want to react to:

I think it should be a v2 thing. I’m not sure if any of the major browsers support displaying web pages on the wearable devices such as Android watches, or whether low power modes such as the Ambient Mode on Android are portable between mobile platforms.

Also, the Ambient Mode is different from the usual “screen on” mode because, per Android documentation, the application should adjust its UI specifically for this mode (simplify the layout, remove interactive controls, reduce update frequency etc). So in addition to opting in to be displayed in the Ambient Mode, the web page must receive a message when the system has entered or exited this mode.

The latter makes me wonder if a an “ambient mode” CSS Media Feature would not be at least one of the useful ways to approach this.


Thanks for your support!

I agree on all arguments of the editor. Display modes are platform and manufacturer dependend which makes the specification of display modes a bit difficult. We will see how major platforms are going to align their products with future display technologies.

I like the idea of an “ambient mode” CSS Media Feature. The power mode of the display is always in the control of the operating system. So the web app can only be notified by some explicit or implicit approach. Similar to screen events there is already a good example of an explicit API approach which is the Page Visibility API