зеркало из https://github.com/mozilla/gecko-dev.git
Bug 805871: Make PeerConnection constraints optional; r=jesup
This commit is contained in:
Родитель
25e28ddb85
Коммит
3a00ca73a2
|
@ -268,6 +268,10 @@ PeerConnection.prototype = {
|
|||
throw new Error("createOffer already called");
|
||||
}
|
||||
|
||||
if (!constraints) {
|
||||
constraints = {};
|
||||
}
|
||||
|
||||
if (!this._validateConstraints(constraints)) {
|
||||
throw new Error("createOffer passed invalid constraints");
|
||||
}
|
||||
|
@ -295,6 +299,10 @@ PeerConnection.prototype = {
|
|||
throw new Error("No outstanding offer");
|
||||
}
|
||||
|
||||
if (!constraints) {
|
||||
constraints = {};
|
||||
}
|
||||
|
||||
if (!this._validateConstraints(constraints)) {
|
||||
throw new Error("createAnswer passed invalid constraints");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче