title: Get maximum video resolution with getUserMedia
body: <p>I'm trying to get highest video resolution as possible through JS <code>navigator.getUserMedia</code>. I know about constraints, but don't know how to choose right in my case.</p>
  
  <p>The problem is looks like there is no way to say "I want a video at maximum resolution". So instead I'm trying to say "I want video not less than very big resolution".</p>
  
  <p>When I'm trying <code>minWidth: 1600</code>, Chrome returns me 1280×720 video (highest possible for my camera, I think). But what if user has camera with higher resolution? So I'm asking for <code>minWidth: 2048</code> video, and Chrome returns only 640×480.</p>
  
  <pre><code>var constraints = {
    video: {
      optional: [
      {minWidth: 2048}
      ]
    }
  };
  </code></pre>
  
  <p>This is online example: <a href="http://jsbin.com/kibeza/1/watch?js,output" rel="noreferrer">http://jsbin.com/kibeza/1/watch?js,output</a></p>
  
  <p>And there is actual problem: Chrome doesn't know math. It think what 1600 is greater than 2048. I can't ask for video "not less than 100500", because in this case I'll get standard low resolution. I cant ask video "not less than some reasonable small resolution", because there can be users with higher resolution and I want to get higher resolution.</p>