title: Getting the mimeType from a MediaRecorder that wasn't initialized with a mimeType
body: <p>I'm using the MediaRecorder API to record some media on a page.  In my MediaRecorder initialization, I'm not specifying content type as I do not require anything in particular.  The browser can choose what it wants.</p>
  
  <pre><code>var mediaRecorder = new MediaRecorder(stream);
  </code></pre>
  
  <p>However, when it comes time to save that recording, I need to know the mimeType for the blob, and so I can determine a reasonable file name extension.</p>
  
  <p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType" rel="nofollow">MediaRecorder.mimeType</a> proprety is what I want, but it is an empty string.  It doesn't set <code>mimeType</code> to the default for MediaRecorder, so I have seemingly no way to know what the default <code>mimeType</code> is.</p>
  
  <pre><code>  mediaRecorder.onstop = function (e) {
      var mediaFileUrl = window.URL.createObjectURL(
        new Blob(chunks, {type: /* TODO: mime type here */})
      );
  
      $('&lt;a&gt;').attr({
        href: mediaFileUrl,
        download: 'Recording.?????' // TODO: Use mime type to figure out file name extension
      })[0].click();
  
      window.URL.revokeObjectURL(mediaFileUrl);
      chunks = [];
    }
  </code></pre>