Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control camera resolution for webrtc in chrome?

Tags:

webrtc

We are using webrtc in chrome to do video conferencing.

That works but it uses our webcam with a bad resolution and in 4:3 aspect ratio. The cam however can deliver HD video in 16:9 format.

How can I control this? By changing Windows settings, chrome configuration or html code?

like image 620
Steffen Heil Avatar asked Mar 13 '13 16:03

Steffen Heil


1 Answers

You can include a request for a specific resolution in the constraints object passed to getUserMedia. For example:

window.navigator.webkitGetUserMedia({
  audio: true,
  video: {optional:[ {minHeight:720}, {minWidth:960} ]}
}, onSuccess, onError);
like image 76
bstrong Avatar answered Jan 27 '23 02:01

bstrong