[whatwg] [html-media-capture] capture vs. accept ( LC-2642)

fantasai fantasai.lists at inkedblade.net
Fri Nov 16 14:14:22 PST 2012

On 11/16/2012 07:38 AM, Frederick.Hirsch at nokia.com wrote:
> fantasai
> Is the WG response (see below) to your Last Call issue (LC-2642)  [1]
> on HTML Media Capture [2] regarding clarification of accept and capture
> [attributes of <input>] sufficient for us to close the issue?

If timeless and/or hixie are happy with it, I am satisfied.

> A rough summary is that
> 1. Accept indicates what is to be captured (e.g. image/*) and Capture
>    indicates the source type, there can be more than one source type
>    for a given 'what'

Other than filesystem vs. live (which could be satisfied by a boolean),
I don't see how the values of 'capture' are adding any information beyond
what can (and should) be provided by 'accept'.

> 2. Conflict is avoided by precedence rule in the specification that
>    the accept attribute takes precedence over the capture attribute

This is fair. I still don't see why you are duplicating the type
information, though. As a general design principle, it's better
to make it impossible for the user/author to provide invalid
combinations than to provide error handling for it.

Btw, thank you for your careful tracking of issues: I appreciate
your meticulousness in addressing them.


> [1] https://www.w3.org/2006/02/lc-comments-tracker/43696/WD-html-media-capture-20120712/2642
>     representing
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0046.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0047.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0048.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0049.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0059.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0060.html
>     - http://lists.w3.org/Archives/Public/public-device-apis/2012Jul/0064.html
> [2] http://dev.w3.org/2009/dap/camera/ (revised editors draft)
>> fantasai wrote:
>>> Hi!
>>> I was wondering, how is 'capture' different from 'accept'? It seems to me the
>>> following are equivalent:
>>>    capture      accept
>>>   ----------------------
>>>    camera       image/*
>>>    camcorder    video/*
>>>    microphone   audio/*
>>>    filesystem   */*
>>> ~fantasai
>> Working Group Resolution (LC-2642):
>> No changes to the specification are needed, please see
>> http://www.w3.org/mid/50127EC5.2080705@opera.com
>> [[
>>> Not only would this avoid duplication, it also avoids conflicts like
>>> <input capture=microphone accept='image/*'>
>> I believe the spec does address this:
>> "The HTMLInputElement interface's accept attribute takes precedence over
>> the capture attribute. That is, if the accept attribute's value is set
>> to a MIME type that is not accepted in a defined capture state, the user
>> agent must act as if there was no capture attribute."
>> ]]
>> ----

More information about the whatwg mailing list