<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17243</bug_id>
          
          <creation_ts>2012-05-30 07:56:22 +0000</creation_ts>
          <short_desc>suggestion on &quot;select camera function for  getUserMedia()&quot;</short_desc>
          <delta_ts>2013-01-29 07:20:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>WebRTC API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yang Sun">eric.sun</reporter>
          <assigned_to name="Web RTC Working Group">public-webrtc</assigned_to>
          <cc>fluffy</cc>
    
    <cc>harald</cc>
    
    <cc>jay</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-webrtc</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68297</commentid>
    <comment_count>0</comment_count>
    <who name="Yang Sun">eric.sun</who>
    <bug_when>2012-05-30 07:56:22 +0000</bug_when>
    <thetext>now there is navigator.getUserMedia() function for html5
But JavaScript can only return 1 stream returned by getUserMedia can capture the stream by successCallback.

For example:
getUserMedia({video:true},successCallback,errorCallback)
function successCallback(stream)
{
  video.src = URL.createObjectURL(stream)
}

Now when we develop some face detection feature using html5, we have 2 or more camera connect to browser, but only by browser UI can we choose which camera can we use.We can not let JS to choose which camera can use, then use JS to manipulate the camera chosen for face detection.

So, can we in future HTML let getUserMedia return references for all available cameras connect to browser in a array, so we can iterate streams and let JS to choose the one we want for later processing, Or in some 3D scenario, to manipulate multiple streams from cameras to show some 3D scene. for example a better quality camera for face detection. 

And streams Array returned by getUserMedia can contain quality information （1 standard for 1 mega-pixel, 5 standard for mega-pixel ）or optionally the description of the camera, so JS can choose by filtering or comparision.

For example:
getUserMedia({video:true},successCallback,errorCallback)
function successCallback((Array type)streams)
{
 while(i&lt;streams.length）
 {
 if streams(i).quality&gt;5
 video.src=url.createObjectURL(stream(i))
 break;
 ......
 }
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77053</commentid>
    <comment_count>1</comment_count>
    <who name="Cullen Jennings">fluffy</who>
    <bug_when>2012-10-24 19:16:48 +0000</bug_when>
    <thetext>I think is being discussed at TPAC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77077</commentid>
    <comment_count>2</comment_count>
    <who name="Yang Sun">eric.sun</who>
    <bug_when>2012-10-25 00:39:33 +0000</bug_when>
    <thetext>list on this TPAC&apos;s agenda?

(In reply to comment #1)
&gt; I think is being discussed at TPAC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77096</commentid>
    <comment_count>3</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2012-10-25 08:26:48 +0000</bug_when>
    <thetext>Media Capture Task Force: http://www.w3.org/wiki/Oct_30_2012 

Bullet point &quot;Device enumeration API&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77097</commentid>
    <comment_count>4</comment_count>
    <who name="Yang Sun">eric.sun</who>
    <bug_when>2012-10-25 08:28:40 +0000</bug_when>
    <thetext>Any material for introduction to Device enumeration API?

(In reply to comment #3)
&gt; Media Capture Task Force: http://www.w3.org/wiki/Oct_30_2012 
&gt; 
&gt; Bullet point &quot;Device enumeration API&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82237</commentid>
    <comment_count>5</comment_count>
    <who name="j.chetwynd">jay</who>
    <bug_when>2013-01-28 18:59:09 +0000</bug_when>
    <thetext>http://www.gnote.org hosts what you may consider a workaround
plug 2 cameras in, visit page

wfm recent Chrome

filed bug: Support more than one camera at a time

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

Opera
DSK-381490@bugs.opera.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82238</commentid>
    <comment_count>6</comment_count>
    <who name="Cullen Jennings">fluffy</who>
    <bug_when>2013-01-28 19:07:15 +0000</bug_when>
    <thetext>this needs to be discussed on the list not in bug tracker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82244</commentid>
    <comment_count>7</comment_count>
    <who name="j.chetwynd">jay</who>
    <bug_when>2013-01-28 22:37:16 +0000</bug_when>
    <thetext>#6 Cullen,

this bug should not be closed by you as fixed.

No action has as yet been taken that results in that state being achieved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82264</commentid>
    <comment_count>8</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2013-01-29 07:20:03 +0000</bug_when>
    <thetext>Please contribute to public-media-capture@w3.org. We are not using the bugzilla for requesting new features.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>