title: HTML5 Media Capture crashes on Android when uploading multiple files
body: <p>I face problems with my HTML5 App for decoding barcodes with JavaScript. For testing reasons I run the implemented algorithms against a database with 1055 pictures (Muenster BarcodeDB with a resolution of 600x800px). It works fine in Chrome on Windows and Safari on iPad 2. But Chrome on my Moto G (Android) crashes after 20-30 pictures without any message. When I use HTML5 Media Capture with camera photos it also crashes after taking several pictures and Chrome reports, that there isn't enough memory for the previous operation. It crashes directly, when the picture was taken and the camera app is closed. Then the browser is shown again with a reaload of the page.</p>
  
  <p>Did anyone face the same problems? Below is some code on how to use the pictures.</p>
  
  <p>HTML Media Capture Input:</p>
  
  <pre><code>&lt;input id="upload" type="file" accept="image/*" capture style="display:none;"&gt;
  </code></pre>
  
  <p>JavaScript Handler (exif.js, megapixImg.js for rotating/scaling image):</p>
  
  <pre><code>fileInput.onchange = function () {
      var file = fileInput.files[0];
      imgOrientation = null;
  
      // get orientation of image from exif data
      EXIF.getData(file, function () {
          imgOrientation = EXIF.getTag(this, "Orientation");
      });
  
      // MegaPixImage constructor accepts File/Blob object.
      megapixImg = new MegaPixImage(file);
  
      // Render resized image into image element using quality option.
      // Quality option is valid when rendering into image element.
      megapixImg.render(tempImg, { maxWidth: maxDimension, maxHeight: maxDimension, quality: 1.0 });
  };
  
  tempImg.onload = function () {
      // Render resized image into canvas element.
      megapixImg.render(tempCanvas, { maxWidth: maxDimension, maxHeight: maxDimension, orientation: imgOrientation });
  
      // TRIGGER ALGORITHM
  };
  </code></pre>