W3C home > Mailing lists > Public > www-style@w3.org > August 2014

Re: [mediaqueries] battery life and screen type

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 15 Aug 2014 10:21:47 -0700
Message-ID: <CAAWBYDBq86WNKD6DSP_M+UH9tBjsb4BtWyUHyrK_QSaYPkNXGw@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style list <www-style@w3.org>
On Wed, Aug 13, 2014 at 9:01 AM, Florian Rivoal <florian@rivoal.net> wrote:
> On Wed, 13 Aug 2014 09:51:10 +0200, Mike Garaffa <mike.garaffa@gmail.com>
> wrote:
>> Have battery life and screen type been considered as potential media
>> queries? If possible, one could check the battery remaining and screen
>> hardware of the current device being used to access their content.
>> For example, if I could see that a user was at (low-battery) and their
>> screen type was (amoled) I could take advantage of their amoled screen and
>> adjust my css to display a primarily black layout to conserve their
>> remaining battery power.
>
> I don't recall this possible media feature being previously discussed.
> Adjusting to the environement to use less energy sounds like a reasonable
> enough goal, but I am not sure this is the right approach.
>
> - How low should the battery be before it is low enough to trigger this?
>
> - You don't always want to wait until the battery is low to try to reduce
> consumption
>
> - expecting web developers to know about the energy usage patterns of
> different screen technologies doesn't sound realistic to me
>
> - Turning off animations, videos, or other cpu/gpu intensive tasks may have
> a bigger effect
>
> Instead, I am thinking this could be offered by a User Agent as a power
> saving mode, which would affect the page via already existing MQ's such as
> "update-frequency" to turn of videos, or light-level / inverted-colors [1]
> to get a black background.
>
> [1] http://lists.w3.org/Archives/Public/www-style/2013Oct/0672.html

I agree.  This sounds like the sort of thing the UA should be managing
automatically.  It might make adjustments that are themselves
reflected in MQs, such as throttling animations and adjusting colors
like Florian said, but this probably shouldn't be something that the
author has to manage explicitly.

If it is a good idea to expose this kind of thing to authors, it
should be done through a dedicated JS API with better listeners/etc.
MQs are not well-designed for more complex interactions.  I think
there's a Battery Status API in development in SysApps?

~TJ
Received on Friday, 15 August 2014 17:22:35 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 August 2014 17:22:35 UTC