W3C home > Mailing lists > Public > public-device-apis@w3.org > June 2010

Re: Capture API question

From: Andrei Popescu <andreip@google.com>
Date: Mon, 21 Jun 2010 21:19:16 +0100
Message-ID: <AANLkTinA36TqxoTCo4CwjhXAL9mMxzwoR0fLJ2BvQFHh@mail.gmail.com>
To: Thomas Roessler <tlr@w3.org>
Cc: "arun@mozilla.com" <arun@mozilla.com>, "Tran, Dzung D" <dzung.d.tran@intel.com>, Dominique Hazael-Massieux <dom@w3.org>, "Ingmar.Kliche" <Ingmar.Kliche@telekom.de>, "Ilkka.Oksanen@nokia.com" <Ilkka.Oksanen@nokia.com>, Robin Berjon <robin@robineko.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>, Brad Lassey <blassey@mozilla.com>, Doug Turner <dougt@mozilla.com>, "khuey@mozilla.com" <khuey@mozilla.com>
Hi Thomas,

On Monday, June 21, 2010, Thomas Roessler <tlr@w3.org> wrote:
> On 21 Jun 2010, at 21:22, Arun Ranganathan wrote:
>
>>> While we're on that one, what are the reasons to overload MIME syntax in @accept instead of adding a separate attribute that triggers a relevant sensor, when present?
>>>
>>
>> Minimizing attributes is nice; I don't think this is overloading. Rather, by including @accept in the first place, we may have all that we need.
>
> I agree on the minimization goal.  But Andrei's proposal adds a pseudo MIME parameter in order to save an HTML parameter. That sounds weird.
>
>> At the risk of bikeshedding, what is your proposal, and why is it better?
>
> Add "capture" as an attribute to "input" (I thought of 'source', but that's much too close to 'src' for comfort).  Same values as for Andrei's pseudo-attribute.
>
> Better because:
> - doesn't add yet another micro syntax (including pseudo-attribute notion) to HTML
> - the "capture" parameter is easily available within the DOM
> - clean fall-back for user agents that might do something useful with the current accept parameter (does anybody actually use it right now?)
>

We did think about adding an attribute but considered that the source
param is nicer because of the same reason as the one Arun mentioned.

Thanks,
Andrei

>> Currently, it seems we have Andrei's proposal:
>>
>> <input type="file" accept="image/*;source=camera">  [1]
>
> <input type="file" accept="image/*" capture="camera">
>
>> Upon reflection, I'm not sure if we even need the extra ";source=camera" part.  Our implementation doesn't use it, and thus we have the existing use of @accept which seems sufficient.  Andrei, do you think we actually need the additional qualifier?  If so, why?
>
>
> (Good question; I wouldn't mind dropping the qualifier.)
>
>
Received on Monday, 21 June 2010 20:19:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:10 GMT