specify constraints in a way which doesnt define the AR

This commit is contained in:
Philipp Hancke 2014-09-01 15:04:38 +02:00
parent a99ba44625
commit eb461d1f65
1 changed files with 4 additions and 2 deletions

View File

@ -613,8 +613,10 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
}
break;
}
if (constraints.video.minWidth) constraints.video.maxWidth = constraints.video.minWidth;
if (constraints.video.minHeight) constraints.video.maxHeight = constraints.video.minHeight;
if (constraints.video.mandatory.minWidth)
constraints.video.mandatory.maxWidth = constraints.video.mandatory.minWidth;
if (constraints.video.mandatory.minHeight)
constraints.video.mandatory.maxHeight = constraints.video.mandatory.minHeight;
if (bandwidth) { // doesn't work currently, see webrtc issue 1846
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true