Reputation: 345
I am testing a peer to peer video chat app using webrtc. when I set the video contraints as
var video_constraints = {
mandatory: {
maxHeight: 120,
maxWidth: 160
},
optional: []
};
window.navigator.webkitGetUserMedia({
audio: true,
video: video_constraints
}, onSuccess, onError);
this fires onError. what could be the reason?
Upvotes: 6
Views: 3744
Reputation: 15279
To quote from code.google.com/p/chromium/issues/detail?id=143631#c9:
GetUserMedia constraints are matched with a fixed list of resolutions independent on what the camera actually support. The list is fixed and used on all platforms.
1280, 720,
960, 720,
640, 360,
640, 480,
320, 240,
320, 180
This means your constraints will fail.
Constraints are also documented in Harald Alvestrand's IETF draft.
Upvotes: 8