mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 813885 - RTCIceCandidate constructor arguments don't match spec. r=jesup
This commit is contained in:
parent
18de49f4ce
commit
f7141fa129
@ -114,14 +114,18 @@ IceCandidate.prototype = {
|
||||
Ci.nsIDOMRTCIceCandidate, Ci.nsIDOMGlobalObjectConstructor
|
||||
]),
|
||||
|
||||
constructor: function(win, cand, mid, mline) {
|
||||
constructor: function(win, candidateInitDict) {
|
||||
if (this._win) {
|
||||
throw new Error("Constructor already called");
|
||||
}
|
||||
this._win = win;
|
||||
this.candidate = cand;
|
||||
this.sdpMid = mid;
|
||||
this.sdpMLineIndex = mline;
|
||||
if (candidateInitDict !== undefined) {
|
||||
this.candidate = candidateInitDict.candidate || null;
|
||||
this.sdpMid = candidateInitDict.sdbMid || null;
|
||||
this.sdpMLineIndex = candidateInitDict.sdpMLineIndex || null;
|
||||
} else {
|
||||
this.candidate = this.sdpMid = this.sdpMLineIndex = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user