Re: [whatwg] Proposal: Wake Lock API

On 15 July 2014 15:51, Marcos Caceres <w3c@marcosc.com> wrote:
>
>
> On July 15, 2014 at 3:31:32 PM, Jasper St. Pierre (jstpierre@mecheye.net) wrote:
>> Should the lock automatically be released if the user switches to a
>> different tab or somehow makes the content unviewable?
>
> Yes. But it could be automatically reapplied once the user switches back to the tab/window. This could happen transparently.

This should be applicable to screen lock only. For system lock an app
should be able go to background tab and ask for for lock, UC web radio
app, or a navigation system giving voice turn by turn instruction.


On 17 July 2014 10:17, Marcos Caceres <w3c@marcosc.com> wrote:
>
> "display" = keep display on + system/cpu + network
> "network" (wifi/cell) = system/cpu + network (screen off)
> "system" = just cpu, turn off screen and radio.
>

If somebody is reading a long page, why do we need to keep network on?
so if it is only display lock, network can be disconnected and only
need to automatically reconnect when there is another network request.


On 13 August 2014 21:00, Jonas Sicking <jonas@sicking.cc> wrote:
>
> An alternative design would be something like
>
> x = new WakeLock("display");
> x.request();
> x.release();
>
> Extra calls of either request() or release() are ignored, but pages
> can create any number of WakeLocks of the same type.

If application made a x.request() then "x" got garbage collected
system should automatically do x.release();

> And note that you in normal use cases *do* want the normal screen
> timeout to kick in when a "display" lock is released. I've seen the
> lack of this many times and it's really annoying. What happens is that
> after you're done watching a 30 minute movie, the application releases
> the lock and the screen immediately shuts off. Attempting to work
> around this by holding the lock for a few minutes past the movie ends
> means that the application has to guess how long timeout the user has
> configured his device to.

I wish you tube app on android implemented this.
As user it is annoying to me when screen turns off immediately after a
long video.
I have set time out for divide to 5 minutes, but if you tube app can
hold the screen for a minute, I will be happy.
Or in other words we don't have to wait another system timeout
duration, it can be just 1 or 2 extra minute after lock release on the
screen.

Received on Thursday, 14 August 2014 04:47:19 UTC