Bug 1000741 - only add the fake media constraint if not provided by the caller. r=rjesup

This commit is contained in:
Nils Ohlmeier [:drno] 2014-04-24 00:18:00 +02:00
parent 3a932629fe
commit 8db0aca6a4

View File

@ -97,7 +97,9 @@ function createMediaElement(type, label) {
* The error callback if the stream fails to be retrieved
*/
function getUserMedia(constraints, onSuccess, onError) {
constraints["fake"] = FAKE_ENABLED;
if (!("fake" in constraints)) {
constraints["fake"] = FAKE_ENABLED;
}
info("Call getUserMedia for " + JSON.stringify(constraints));
navigator.mozGetUserMedia(constraints, onSuccess, onError);