Bug 1230184 - add media.peerconnection.simulcast pref. r=bwc

This commit is contained in:
Jan-Ivar Bruaroey 2015-12-31 10:32:26 -06:00
parent 4675430c2d
commit 156906a3ab
2 changed files with 66 additions and 55 deletions

View File

@ -1039,7 +1039,9 @@ RTCPeerConnection.prototype = {
},
_setParameters: function(sender, parameters) {
if (!Services.prefs.getBoolPref("media.peerconnection.simulcast")) {
return;
}
// validate parameters input
var encodings = parameters.encodings || [];
@ -1058,6 +1060,9 @@ RTCPeerConnection.prototype = {
},
_getParameters: function(sender) {
if (!Services.prefs.getBoolPref("media.peerconnection.simulcast")) {
return;
}
return this._impl.getParameters(sender.track);
},

View File

@ -63,7 +63,11 @@
testParameters({});
}
runNetworkTest(function () {
var pushPrefs = (...p) => new Promise(r => SpecialPowers.pushPrefEnv({set: p}, r));
runNetworkTest(() =>
pushPrefs(['media.peerconnection.simulcast', true]).then(() => {
test = new PeerConnectionTest();
test.setMediaConstraints([{video: true}], [{video: true}]);
test.chain.removeAfter("PC_REMOTE_WAIT_FOR_MEDIA_FLOW");
@ -75,8 +79,10 @@
}
]);
test.run();
});
return test.run();
})
.catch(e => ok(false, "unexpected failure: " + e)));
</script>
</pre>
</body>