incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: capabilities api
Date Sat, 20 Oct 2012 00:34:13 GMT
http://www.youtube.com/watch?v=Drkh0YLF8rI

On Fri, Oct 19, 2012 at 5:24 PM, Shazron <shazron@gmail.com> wrote:
> I would think all the properties would return a boolean?
>
> So for example, an iPhone 3GS would be:
>
> window.device.capabilities.frontcamera == false
> window.device.capabilities.backcamera == true
> window.device.capabilities.flash == false
> window.device.capabilities.compass == true
> window.device.capabilities.accelerometer == true
>
> etc - flat hierarchy
>
> On Fri, Oct 19, 2012 at 5:16 PM, Brian LeRoux <b@brian.io> wrote:
>> ya. slippery ground. the orig query, and valid one at that imo, is how
>> to find out if we have any camera, or two.
>>
>> window.device.capabilities.camera // returns ... an array? an integer?
>>
>>
>>
>> On Fri, Oct 19, 2012 at 5:06 PM, Filip Maj <fil@adobe.com> wrote:
>>> Hmm so then standardizing the .capabilities object becomes the hard part?
>>>
>>> On 10/19/12 4:56 PM, "Shazron" <shazron@gmail.com> wrote:
>>>
>>>>We already have the window.device object -- we can tack on a
>>>>window.device.capabilities object that could contain the boolean
>>>>properties or something.
>>>>
>>>>On Fri, Oct 19, 2012 at 4:52 PM, Brian LeRoux <b@brian.io> wrote:
>>>>> I dunno, I think this is independent of the current APIs. (More than
>>>>> one API we have deals w/ Cameras for example.) Seems like we want more
>>>>> nuance than boolean too (consider front && back camera). We are
>>>>> definitely talking about hardware/sensors detection.
>>>>>
>>>>> Not loving the w3c cc/pp spec, that RDF business looks hairy, I think
>>>>> we need something more approachable like you describe.
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 19, 2012 at 4:23 PM, Filip Maj <fil@adobe.com> wrote:
>>>>>> Tack on a .yep boolean onto every API surface?
>>>>>>
>>>>>> On 10/19/12 2:25 PM, "Brian LeRoux" <b@brian.io> wrote:
>>>>>>
>>>>>>>Community member Ian has noticed our lack of a capabilities api,
and
>>>>>>>ignoring the snipe at our foresight, I do agree its a missing
piece in
>>>>>>>the web platform. [1]
>>>>>>>
>>>>>>>There is some prior art.
>>>>>>>
>>>>>>>- Media queries have a couple of interesting APIs (matchMedia
[2],
>>>>>>>window.devicePixelRatio, and potentially a future
>>>>>>>navigator.supportsCSS).
>>>>>>>- Flash has a comprehensive capabilities API. [3]
>>>>>>>- The W3C has a somewhat unwieldy take on this issue. [4]  It
should
>>>>>>>be noted that a new working group at the w3c called sysapps will
be
>>>>>>>addressing this.
>>>>>>>- Tizen has a System Info API (which I'd link to but cannot).
>>>>>>>
>>>>>>>Does anyone have any thoughts on how we should structure / develop
out
>>>>>>>the ability for our users to query the device capbilities?
>>>>>>>
>>>>>>>[1] https://twitter.com/iandevlin/status/259309546969903104
>>>>>>>[2] https://developer.mozilla.org/en-US/docs/DOM/window.matchMedia
>>>>>>>[3]
>>>>>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flas
>>>>>>>h/s
>>>>>>>ystem/Capabilities.html
>>>>>>>[4] http://www.w3.org/TR/2007/WD-CCPP-struct-vocab2-20070430/
>>>>>>
>>>

Mime
View raw message