W3C home > Mailing lists > Public > public-device-apis@w3.org > January 2016

Re: [sensors] Define behavior when visibilityState != "visible"

From: Marcos Caceres via GitHub <sysbot+gh@w3.org>
Date: Thu, 21 Jan 2016 23:15:50 +0000
To: public-device-apis@w3.org
Message-ID: <issue_comment.created-173746311-1453418149-sysbot+gh@w3.org>
Depends, sometimes it's critical to have sensor data being sent in the
 background - for example, if I'm driving based on that sensors 
information but I temporarily swapped apps.

Sent from my iPhone

> On 22 Jan 2016, at 9:18 AM, Tobie Langel <notifications@github.com> 
> What happens when a sensor is instantiated in a document whose 
visibilityState isn't "visible". Should we just throw a SecurityError 
like for secure context violations or should we do nothing but avoid 
sensing data until visibilityState goes back to "visible"? If the 
latter, should we have events to describe that?
> What happens when the visibility state changes:
> from "visible" to something else? Emit an error event? Stop sending 
> from something else to "visible"? Do we start sending data?
> My feeling is that we should simply not emit data when 
visibilityState isn't "visible" and resume emission when it switches 
back to visible. Not sure whether we should emit events on the sensor 
object itself for this (like "paused" and "resumed" or something.
> —
> Reply to this email directly or view it on GitHub.

GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/81#issuecomment-173746311 using 
your GitHub account
Received on Thursday, 21 January 2016 23:15:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:27 UTC