2009/dap/camera/LC-html-media-capture Overview.html,NONE,1.1 capture-api-file-picker-concept.png,NONE,1.1

Update of /sources/public/2009/dap/camera/LC-html-media-capture
In directory hutz:/tmp/cvs-serv3660/LC-html-media-capture

Added Files:
	Overview.html capture-api-file-picker-concept.png 
Log Message:
HMC LC

--- NEW FILE: capture-api-file-picker-concept.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: Overview.html ---
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html lang="en" dir="ltr">
<head>
    <title>HTML Media Capture</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    
    
    
  <style type="text/css">/*****************************************************************
 * ReSpec 3 CSS
 * Robin Berjon - http://berjon.com/
 *****************************************************************/

/* --- INLINES --- */
em.rfc2119 { 
    text-transform:     lowercase;
    font-variant:       small-caps;
    font-style:         normal;
    color:              #900;
}

h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
    border: none;
}

dfn {
    font-weight:    bold;
}

a.internalDFN {
    color:  inherit;
    border-bottom:  1px solid #99c;
    text-decoration:    none;
}

a.externalDFN {
    color:  inherit;
    border-bottom:  1px dotted #ccc;
    text-decoration:    none;
}

a.bibref {
    text-decoration:    none;
}

cite .bibref {
    font-style: normal;
}

code {
    color:  #ff4500;
}


/* --- --- */
ol.algorithm { counter-reset:numsection; list-style-type: none; }
ol.algorithm li { margin: 0.5em 0; }
ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }

/* --- TOC --- */
.toc a, .tof a {
    text-decoration:    none;
}

a .secno, a .figno {
    color:  #000;
}

ul.tof, ol.tof {
    list-style: none outside none;
}

.caption {
    margin-top: 0.5em;
    font-style:   italic;
}

/* --- TABLE --- */
table.simple {
    border-spacing: 0;
    border-collapse:    collapse;
    border-bottom:  3px solid #005a9c;
}

.simple th {
    background: #005a9c;
    color:  #fff;
    padding:    3px 5px;
    text-align: left;
}

.simple th[scope="row"] {
    background: inherit;
    color:  inherit;
    border-top: 1px solid #ddd;
}

.simple td {
    padding:    3px 10px;
    border-top: 1px solid #ddd;
}

.simple tr:nth-child(even) {
    background: #f0f6ff;
}

/* --- DL --- */
.section dd > p:first-child {
    margin-top: 0;
}

.section dd > p:last-child {
    margin-bottom: 0;
}

.section dd {
    margin-bottom:  1em;
}

.section dl.attrs dd, .section dl.eldef dd {
    margin-bottom:  0;
}
</style><style type="text/css">/* --- EXAMPLES --- */
div.example-title {
    min-width: 7.5em;
    color: #b9ab2d;
}
div.example-title span {
    text-transform: uppercase;   
}
div.example, div.illegal-example {
    padding: 0.5em;
    margin: 1em 0;
    position: relative;
    clear: both;
}
div.illegal-example { color: red }
div.illegal-example p { color: black }
div.example {
    padding: .5em;
    border-left-width: .5em;
    border-left-style: solid;
    border-color: #e0cb52;
    background: #fcfaee;    
}
</style><style type="text/css">/* --- ISSUES/NOTES --- */
div.issue-title, div.note-title {
    padding-right:  1em;
    min-width: 7.5em;
    color: #b9ab2d;
}
div.issue-title { color: #e05252; }
div.note-title { color: #52e052; }
div.issue-title span, div.note-title span {
    text-transform: uppercase;
}
div.note, div.issue {
    margin-top: 1em;
    margin-bottom: 1em;
}
.note > p:first-child, .issue > p:first-child { margin-top: 0 }
.issue, .note {
    padding: .5em;
    border-left-width: .5em;
    border-left-style: solid;
}
div.issue, div.note {
    padding: 0.5em;
    margin: 1em 0;
    position: relative;
    clear: both;
}
span.note, span.issue { padding: .1em .5em .15em; }

.issue {
    border-color: #e05252;
    background: #fbe9e9;
}
.note {
    border-color: #52e052;
    background: #e9fbe9;
}


</style><style type="text/css">/* HIGHLIGHTS */
code.prettyprint {
    color:  inherit;
}

/* this from google-code-prettify */
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
</style><style type="text/css">/* --- WEB IDL --- */
pre.idl {
    border-top: 1px solid #90b8de;
    border-bottom: 1px solid #90b8de;
    padding:    1em;
    line-height:    120%;
}

pre.idl::before {
    content:    "WebIDL";
    display:    block;
    width:      150px;
    background: #90b8de;
    color:  #fff;
    font-family:    initial;
    padding:    3px;
    font-weight:    bold;
    margin: -1em 0 1em -1em;
}

.idlType {
    color:  #ff4500;
    font-weight:    bold;
    text-decoration:    none;
}

/*.idlModule*/
/*.idlModuleID*/
/*.idlInterface*/
.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
    font-weight:    bold;
    color:  #005a9c;
}

.idlSuperclass {
    font-style: italic;
    color:  #005a9c;
}

/*.idlAttribute*/
.idlAttrType, .idlFieldType, .idlMemberType {
    color:  #005a9c;
}
.idlAttrName, .idlFieldName, .idlMemberName {
    color:  #ff4500;
}
.idlAttrName a, .idlFieldName a, .idlMemberName a {
    color:  #ff4500;
    border-bottom:  1px dotted #ff4500;
    text-decoration: none;
}

/*.idlMethod*/
.idlMethType, .idlCallbackType {
    color:  #005a9c;
}
.idlMethName {
    color:  #ff4500;
}
.idlMethName a {
    color:  #ff4500;
    border-bottom:  1px dotted #ff4500;
    text-decoration: none;
}

/*.idlParam*/
.idlParamType {
    color:  #005a9c;
}
.idlParamName {
    font-style: italic;
}

.extAttr {
    color:  #666;
}

/*.idlConst*/
.idlConstType {
    color:  #005a9c;
}
.idlConstName {
    color:  #ff4500;
}
.idlConstName a {
    color:  #ff4500;
    border-bottom:  1px dotted #ff4500;
    text-decoration: none;
}

/*.idlException*/
.idlExceptionID {
    font-weight:    bold;
    color:  #c00;
}

.idlTypedefID, .idlTypedefType {
    color:  #005a9c;
}

.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
    color:  #c00;
    font-weight:    normal;
}

.excName a {
    font-family:    monospace;
}

.idlRaises a.idlType, .excName a.idlType {
    border-bottom:  1px dotted #c00;
}

.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
    width:  45px;
    text-align: center;
}
.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }

.idlImplements a {
    font-weight:    bold;
}

dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
    margin-left:    2em;
}

.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
    font-weight:    normal;
}

.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
    font-weight:    bold;
    color:  #000;
    font-family:    monospace;
}

.attributes dt code, .fields dt code, .dictionary-members dt code {
    background:  #ffffd2;
}

.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
    color:  #005a9c;
    background:  transparent;
    font-family:    inherit;
    font-weight:    normal;
    font-style: italic;
}

.methods dt code {
    background:  #d9e6f8;
}

.constants dt code {
    background:  #ddffd2;
}

.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
    margin-bottom:  1em;
}

table.parameters, table.exceptions {
    border-spacing: 0;
    border-collapse:    collapse;
    margin: 0.5em 0;
    width:  100%;
}
table.parameters { border-bottom:  1px solid #90b8de; }
table.exceptions { border-bottom:  1px solid #deb890; }

.parameters th, .exceptions th {
    color:  #fff;
    padding:    3px 5px;
    text-align: left;
    font-family:    initial;
    font-weight:    normal;
    text-shadow:    #666 1px 1px 0;
}
.parameters th { background: #90b8de; }
.exceptions th { background: #deb890; }

.parameters td, .exceptions td {
    padding:    3px 10px;
    border-top: 1px solid #ddd;
    vertical-align: top;
}

.parameters tr:first-child td, .exceptions tr:first-child td {
    border-top: none;
}

.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
    width:  100px;
}

.parameters td.prmType {
    width:  120px;
}

table.exceptions table {
    border-spacing: 0;
    border-collapse:    collapse;
    width:  100%;
}
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet"></head>
  <body><div class="head">
  <p>
    
      <a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a>
    
  </p>
  <h1 class="title" id="title">HTML Media Capture</h1>
  
  <h2 id="w3c-working-draft-12-july-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Working Draft 12 July 2012</h2>
  <dl>
    
      <dt>This version:</dt>
      <dd><a href="http://www.w3.org/TR/2012/WD-html-media-capture-20120712/">http://www.w3.org/TR/2012/WD-html-media-capture-20120712/</a></dd>
      <dt>Latest published version:</dt>
      <dd><a href="http://www.w3.org/TR/html-media-capture/">http://www.w3.org/TR/html-media-capture/</a></dd>
    
    
      <dt>Latest editor's draft:</dt>
      <dd><a href="http://dev.w3.org/2009/dap/camera/">http://dev.w3.org/2009/dap/camera/</a></dd>
    
    
    
    
    
      <dt>Previous version:</dt>
      <dd><a href="http://www.w3.org/TR/2012/WD-html-media-capture-20120529/">http://www.w3.org/TR/2012/WD-html-media-capture-20120529/</a></dd>
    
    
    <dt>Editors:</dt>
    <dd><span>Anssi Kostiainen</span>, Nokia</dd>
<dd><span>Ilkka Oksanen</span>, Nokia (until May 10, 2012)</dd>
<dd><span>Dominique Hazaël-Massieux</span>, <abbr title="World Wide Web Consortium">W3C</abbr> (until May 10, 2012)</dd>

    
  </dl>
  
  
  
  
    
      <p class="copyright">
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 
        2012
        
        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> 
        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
        <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
      </p>
    
  
  <hr>
</div>
    
    <div class="introductory section" id="abstract"><h2>Abstract</h2><p>
      The HTML Media Capture specification defines HTML form extensions that
      facilitate users' access to media capture capabilities of the hosting
      device.
    </p></div><div id="sotd" class="introductory section"><h2>Status of This Document</h2>
  
    
      
        <p>
          <em>This section describes the status of this document at the time of its publication. Other
          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
          index</a> at http://www.w3.org/TR/.</em>
        </p>
        
    
        <p>
          This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as a Last Call Working Draft.
          
            This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
          
          If you wish to make comments regarding this document, please send them to 
          <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a> 
          (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>,
          <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>).
          The Last Call period ends 09 August 2012.
          
          All feedback is welcome.
        </p>
        
          <p>
            Publication as a Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
            This is a draft document and may be updated, replaced or obsoleted by other documents at 
            any time. It is inappropriate to cite this document as other than work in progress.
          </p>
        
        
          <p>
            This is a Last Call Working Draft and thus the Working Group has determined that this document has satisfied the
            relevant technical requirements and is sufficiently stable to advance through the Technical Recommendation process.
          </p>
        
        <p>
          
            This document was produced by a group operating under the 
            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
          
          
          
            
              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a> 
            
            made in connection with the deliverables of the group; that page also includes instructions for 
            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
          
          
        </p>
        
      
    
  
</div><div class="section" id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">2. </span>Conformance</a></li><li class="tocline"><a class="tocxref" href="#terminology"><span class="secno">3. </span>Terminology</a></li><li class="tocline"><a class="tocxref" href="#security"><span class="secno">4. </span>Security and privacy considerations</a></li><li class="tocline"><a class="tocxref" href="#the-capture-attribute"><span class="secno">5. </span>The capture attribute</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes"><span class="secno">5.1 </span>Attributes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#examples"><span class="secno">A. </span>Examples</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">B. </span>References</a><l class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
    
    
    
    <div id="introduction" class="informative section">
      <!--OddPage--><h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
      <p>
        This specification extends the <code><a class="internalDFN" href="#dfn-htmlinputelement">HTMLInputElement</a></code>
        interface with a new <code><a class="internalDFN" href="#dfn-capture-1">capture</a></code> attribute. The
        attribute enables content authors to give hints of preferred means to
        capture local media such as images, video, and sound, that is to be
        subsequently uploaded. Conformant user agents provide their users more
        seamless access to the above-mentioned media capture capabilities of
        the hosting device.
      </p>
      <p>
        Access to media streams from the hosting device is out of scope for
        this specification.
      </p>
    </div>

    <div class="section" id="conformance"><!--OddPage--><h2><span class="secno">2. </span>Conformance</h2>
<p>
  As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
  and notes in this specification are non-normative. Everything else in this specification is
  normative.
</p>
<p>
  The key words <em title="must" class="rfc2119">must</em>, <em title="must not" class="rfc2119">must not</em>, <em title="required" class="rfc2119">required</em>, <em title="should" class="rfc2119">should</em>, <em title="should not" class="rfc2119">should not</em>, <em title="recommended" class="rfc2119">recommended</em>, <em title="may" class="rfc2119">may</em>,
  and <em title="optional" class="rfc2119">optional</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>].
</p>

      <p>
        This specification defines conformance criteria that apply to a single
        product: the <dfn id="dfn-user-agent">user agent</dfn> that implements the interfaces that
        it contains.
      </p>
      <p>
        Implementations that use ECMAScript to implement the APIs defined in
        this specification must implement them in a manner consistent with the
        ECMAScript Bindings defined in the Web IDL specification [<cite><a href="#bib-WEBIDL" class="bibref">WEBIDL</a></cite>],
        as this specification uses that specification and terminology.
      </p>
    </div>
    
    <div class="section" id="terminology">
      <!--OddPage--><h2><span class="secno">3. </span>Terminology</h2>
      <p>
        The
        <a href="http://dev.w3.org/html5/spec/the-input-element.html#the-input-element">
        <code><dfn id="dfn-input">input</dfn></code> element</a> and the
        <a href="http://dev.w3.org/html5/spec/the-input-element.html#htmlinputelement">
        <code><dfn id="dfn-htmlinputelement">HTMLInputElement</dfn></code></a> interface are defined in
        [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].
      </p>
      <p>
        The 
        <a href="http://dev.w3.org/html5/spec/states-of-the-type-attribute.html#file-upload-state-type-file">
        <dfn id="dfn-file-upload">File Upload</dfn></a> <a class="internalDFN" href="#dfn-state">state</a> is defined in [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].
      </p>
      <p>
        The
        <a href="http://dev.w3.org/html5/spec/common-microsyntaxes.html#enumerated-attribute">
        <dfn id="dfn-enumerated-attribute">enumerated attribute</dfn></a> microsyntax, and associated terms
        and concepts <dfn id="dfn-keyword">keyword</dfn>, <dfn id="dfn-state">state</dfn>, <dfn id="dfn-invalid-value-default">invalid value
        default</dfn>, and <dfn id="dfn-missing-value-default">missing value default</dfn>, are defined in
        [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].
      </p>
      <p>
        In this specification, the term <dfn id="dfn-capture-control-type">capture control type</dfn>
        refers to a specialized type of a file picker control that is
        optimized, for the user, for capturing media of a specified type.
      </p>
    </div>
    
    <div class="section" id="security">
      <!--OddPage--><h2><span class="secno">4. </span>Security and privacy considerations</h2>
      <p>
        This specification builds upon the security and privacy protections
        provided by the <code>&lt;input type="file"&gt;</code> [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>] and
        the [<cite><a href="#bib-FILE-API" class="bibref">FILE-API</a></cite>] specifications; in particular, it is expected that
        any offer to start capturing content from the user’s device would
        require a specific user interaction on an HTML element that is entirely
        controlled by the user agent.
      </p>
      <p>
        Implementors should take care of additional leakage of privacy-sensitive
        data from captured media. For instance, embedding the user’s location in
        a captured media metadata (e.g. EXIF) might transmit more private data
        than the user might be expecting.
      </p>
    </div>
    
    <div class="section" id="the-capture-attribute">
      <!--OddPage--><h2><span class="secno">5. </span>The capture attribute</h2>
      <p>This section is normative.</p>
      <p>
        When an <code><a class="internalDFN" href="#dfn-input">input</a></code> element's <code>type</code> attribute is in
        the <a class="internalDFN" href="#dfn-file-upload">File Upload</a> <a class="internalDFN" href="#dfn-state">state</a>, the rules in this section apply.
      </p>
      <pre class="idl"><span class="idlInterface" id="idl-def-HTMLInputElement">partial interface <span class="idlInterfaceID">HTMLInputElement</span> {
<span class="idlAttribute">    attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-HTMLInputElement-capture">capture</a></span>;</span>
};</span></pre><div class="section" id="attributes"><h3><span class="secno">5.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-HTMLInputElement-capture"><code>capture</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
        </dd></dl></div>
      <p>
        When the <code><dfn id="dfn-capture-1">capture</dfn></code> attribute is specified, the
        <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="should" class="rfc2119">should</em> invoke a file picker of the specific
        <a class="internalDFN" href="#dfn-capture-control-type">capture control type</a>.
      </p>
      <p>
        The <code><a class="internalDFN" href="#dfn-capture-1">capture</a></code> attribute controls the capture
        <a class="internalDFN" href="#dfn-state">state</a> (and associated <a class="internalDFN" href="#dfn-capture-control-type">capture control type</a>) of the
        element. It is an <a class="internalDFN" href="#dfn-enumerated-attribute">enumerated attribute</a>. The following table
        lists the <a class="internalDFN" href="#dfn-keyword">keyword</a>s, <a class="internalDFN" href="#dfn-state">state</a>s, and corresponding <a class="internalDFN" href="#dfn-capture-control-type">capture
        control type</a>s for the attribute. The <a class="internalDFN" href="#dfn-keyword">keyword</a>s
        <code><dfn id="dfn-camera">camera</dfn></code>, <code><dfn id="dfn-camcorder">camcorder</dfn></code>,
        <code><dfn id="dfn-microphone">microphone</dfn></code>, and <code><dfn id="dfn-filesystem">filesystem
        </dfn></code> map to the corresponding <a class="internalDFN" href="#dfn-state">state</a>s:
        <dfn id="dfn-image-capture">Image Capture</dfn>, <dfn id="dfn-video-capture">Video Capture</dfn>, <dfn id="dfn-sound-capture">Sound
        Capture</dfn>, and <a class="internalDFN" href="#dfn-file-upload">File Upload</a> respectively.
      </p>
      <table class="simple">
        <tbody><tr>
          <th><a>Keyword</a></th>
          <th><a>State</a></th>
          <th><a>Capture control type</a></th>
        </tr>
        <tr>
          <td><code><a class="internalDFN" href="#dfn-camera">camera</a></code></td>
          <td><a class="internalDFN" href="#dfn-image-capture">Image Capture</a></td>
          <td>A camera</td>
        </tr>
        <tr>
          <td><code><a class="internalDFN" href="#dfn-camcorder">camcorder</a></code></td>
          <td><a class="internalDFN" href="#dfn-video-capture">Video Capture</a></td>
          <td>A video camera</td>
        </tr>
        <tr>
          <td><code><a class="internalDFN" href="#dfn-microphone">microphone</a></code></td>
          <td><a class="internalDFN" href="#dfn-sound-capture">Sound Capture</a></td>
          <td>A sound recorder</td>
        </tr>
        <tr>
          <td><code><a class="internalDFN" href="#dfn-filesystem">filesystem</a></code></td>
          <td><a class="internalDFN" href="#dfn-file-upload">File Upload</a></td>
          <td>A generic file picker</td>
        </tr>
      </tbody></table>
      <p>
        The <code><a class="internalDFN" href="#dfn-capture-1">capture</a></code> attribute's <em><a class="internalDFN" href="#dfn-invalid-value-default">invalid value
        default</a></em> and <em><a class="internalDFN" href="#dfn-missing-value-default">missing value default</a></em> is the
        <a class="internalDFN" href="#dfn-file-upload">File Upload</a> <a class="internalDFN" href="#dfn-state">state</a>.
      </p>
      <p>
        The <code>HTMLInputElement</code> interface's <code>accept</code>
        attribute takes precedence over the <code><a class="internalDFN" href="#dfn-capture-1">capture</a></code>
        attribute. That is, if the <code>accept</code> attribute's value is set
        to a MIME type that is not accepted in a defined capture <a class="internalDFN" href="#dfn-state">state</a>,
        the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="must" class="rfc2119">must</em> act as if there was no <code><a class="internalDFN" href="#dfn-capture-1">capture
        </a></code> attribute.
      </p>
      <div class="note"><div class="note-title"><span>Note</span></div><div class="">
        This specification complements the following behavior defined in the
        <a class="internalDFN" href="#dfn-file-upload">File Upload</a> <a class="internalDFN" href="#dfn-state">state</a> [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>]: User agents may use the
        value of [the <code>accept</code>] attribute to display a more
        appropriate user interface than a generic file picker. For instance,
        given the value <code>image/*</code>, a user agent could offer the user
        the option of using a local camera or selecting a photograph from their
        photo collection; given the value <code>audio/*, </code> a user agent
        could offer the user the option of recording a clip using a headset
        microphone.
      </div></div>
    </div>
    
    <div id="examples" class="appendix informative section">
    <!--OddPage--><h2><span class="secno">A. </span>Examples</h2><p><em>This section is non-normative.</em></p>
    <p>
      The following example gives a hint that it is preferred for the user to
      take a picture using the device's local camera, and upload the picture
      taken:
    </p>
    <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;input</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"file"</span><span class="pln"> </span><span class="atn">accept</span><span class="pun">=</span><span class="atv">"image/*"</span><span class="pln"> </span><span class="atn">capture</span><span class="pun">=</span><span class="atv">"camera"</span><span class="tag">&gt;</span></pre></div>
    <p>
      When an <code><a class="internalDFN" href="#dfn-input">input</a></code> element's <code><a class="internalDFN" href="#dfn-capture-1">capture</a></code>
      attribute is in the <a class="internalDFN" href="#dfn-image-capture">Image Capture</a> <a class="internalDFN" href="#dfn-state">state</a>, the file picker
      may render as presented on the right side. When the attribute is in the
      <a class="internalDFN" href="#dfn-file-upload">File Upload</a> <a class="internalDFN" href="#dfn-state">state</a>, the generic file picker may render as
      represented on the left side.
    </p>
    <p>
      <img alt="A File picker control in the File Upload (left) and Image
      Capture state (right)." src="capture-api-file-picker-concept.png">
    </p>
  </div>
  


<div class="appendix section" id="references"><!--OddPage--><h2><span class="secno">B. </span>References</h2><div class="section" id="normative-references"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-FILE-API">[FILE-API]</dt><dd>Arun Ranganathan; Jonas Sicking. <a href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/"><cite>File API.</cite></a> 20 October 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/">http://www.w3.org/TR/2011/WD-FileAPI-20111020/</a> 
</dd><dt id="bib-HTML5">[HTML5]</dt><dd>Ian Hickson; David Hyatt. <a href="http://www.w3.org/TR/html5"><cite>HTML5.</cite></a> 25 May 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/html5">http://www.w3.org/TR/html5</a> 
</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119.  URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a> 
</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite>Web IDL.</cite></a> 27 September 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/">http://www.w3.org/TR/2011/WD-WebIDL-20110927/</a> 
</dd></dl></div><div class="section" id="informative-references"><h3><span class="secno">B.2 </span>Informative references</h3><p>No informative references.</p></div></div></body></html>

Received on Tuesday, 10 July 2012 14:46:13 UTC