Re: [sensors] Device Proximity (was: Device light and proximity sensor)

On 9.5.2012, at 23.32, ext Marcos Caceres wrote:

> Hi Anssi,  
> Nice work on the spec… some comments…  

Thanks! Sorry for the late reply. I've been a bit overwhelmed by the number of replies.

> On Wednesday, May 9, 2012 at 1:15 PM, Anssi Kostiainen wrote:
> 
>> [2] http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html
> 
> 
> Maybe reword the abstract to:
> 
> "This specification defines a means to receive events that correspond to a proximity sensor detecting the presence of a physical object."

Your proposal sounds fine, I updated the abstract.

> Reliance on HTML5's definition of "Function" as a type might be risky. Please see proposal 2 here:     
> http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0380.html

Many specs depend on [TreatNonCallableAsNull]. I wouldn't worry about this so early on. Thanks for the pointer anyway.

> IMO, this is too precise: "The current proximity is the distance between the hosting device and the nearby object, in centimeters."  

Do you have an alternative proposal in mind?

> So, if we are talking about the same sensor (the one that switches the screen off when you put the phone close to your face), then it might be good to amend the interface to tell you if it is near or far (as some sensors only report a binary near or far measurement). Something like:
> 
> readonly attribute boolean near;  
> 
> or  
> 
> enum Proximity { "far", "near" };
> readonly attribute Proximity proximity;   

This is what I meant with the following issue I mentioned in the draft:

[[

Specify another more abstract proximity event that fires only when the screen is close to the user's face as per Jonas' proposal.

]]

Here's the related Bugzilla entry people interested in this may want to follow:

  https://bugzilla.mozilla.org/show_bug.cgi?id=751663

-Anssi

Received on Tuesday, 15 May 2012 07:24:34 UTC