title: How to access the specific camera on mobile phone through html5
body: <p>When I use html5 'getUserMedia' API to access acamera on the android（4.0） phone， it comes out "front camera", but I want to open "back camera". Sample code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
     &lt;meta charset="UTF-8"&gt;
     &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;title&gt;Html5 Mobile Carema&lt;/title&gt;
      &lt;script src="js/jquery.js"&gt;&lt;/script&gt;
      &lt;script&gt;
         $(document).ready(init);
  
         function init() {
         try {
          window.URL = window.URL || window.webkitURL || window.msURL
                  || window.oURL;
          navigator.getUserMedia = navigator.getUserMedia
                  || navigator.webkitGetUserMedia
                  || navigator.mozGetUserMedia ||         navigator.msGetUserMedia;
  
  
          navigator.getUserMedia({
              video : true
          }, successsCallback, errorCallback);
      } catch (err) {
          // Tries it with old spec of string syntax
          navigator.getUserMedia('video', successsCallback, errorCallback);
      }
      $(":button").click(function() {
          slap();
      });
  }
  function slap() {
      var video = $("#myVideo")[0];
      var canvas = capture(video);
      $("#result").empty();
      $("#result").append(canvas);
      //alert();
      var imgData = canvas.toDataURL('image/png；base64,');
      //var imgData = canvas.toDataURL("image/png");
      var imgData = imgData.substring(22);
      //blb = dataURItoBlob(imgData);
      //sendMsg(blb);
  }
  function errorCallback(err) {
  
  }
  function successsCallback(stream) {
      $("#myVideo").attr("src", window.webkitURL.createObjectURL(stream));
  }
  function capture(video) {
      var canvas = document.createElement('canvas');
      var width = video.videoWidth;
      var height = video.videoHeight;
      canvas.width = video.videoWidth;
      canvas.height = video.videoHeight;
      var context = canvas.getContext('2d');
      context.drawImage(video, 0, 0, 160, 120);
      return canvas;
  }
  
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;video id="myVideo" autoplay="autoplay"&gt;&lt;/video&gt;
      &lt;br&gt; &lt;input type="button" value="capture" /&gt;
  &lt;br&gt;&lt;div id="result" style="width: 145px"&gt;&lt;/div&gt;
  &lt;div&gt;
  &lt;p id="resultMsg" style="color: red"&gt;&lt;/p&gt;
  &lt;p id="decodeTime" style="color: green"&gt;&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I don't know how to access specific camera on android phone, anyone who knows? thanks</p>