зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1091290 - Queue addIceCandidate correctly to not overwrite already-queued callbacks. r=bwc
This commit is contained in:
Родитель
f5e0b0d131
Коммит
f897a568c9
|
@ -835,13 +835,18 @@ RTCPeerConnection.prototype = {
|
|||
throw new this._win.DOMError("",
|
||||
"Invalid candidate passed to addIceCandidate!");
|
||||
}
|
||||
|
||||
this._queueOrRun({
|
||||
func: this._addIceCandidate,
|
||||
args: [cand, onSuccess, onError],
|
||||
wait: false
|
||||
});
|
||||
},
|
||||
|
||||
_addIceCandidate: function(cand, onSuccess, onError) {
|
||||
this._onAddIceCandidateSuccess = onSuccess || null;
|
||||
this._onAddIceCandidateError = onError || null;
|
||||
|
||||
this._queueOrRun({ func: this._addIceCandidate, args: [cand], wait: false });
|
||||
},
|
||||
|
||||
_addIceCandidate: function(cand) {
|
||||
this._impl.addIceCandidate(cand.candidate, cand.sdpMid || "",
|
||||
(cand.sdpMLineIndex === null) ? 0 :
|
||||
cand.sdpMLineIndex + 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче