Get maximum video resolution with getUserMedia
Use: var constraints = { video: { width: { ideal: 4096 }, height: { ideal: 2160 } } }; This will make the browser use the maximum resolution available, up to 4K. Works in Chrome 63, Edge 41 and Firefox 58. Citing MDN regarding the use of ideal: An ideal value, when used, has gravity, … Read more