Bug 1535442 - Part 4: Put the ufrag in the right attribute, and handle end-of-candidates. r=jib

Differential Revision: https://phabricator.services.mozilla.com/D24278

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-03-27 21:54:23 +00:00
Родитель b1a7a65902
Коммит f2f7746982
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1697,13 +1697,13 @@ class PeerConnectionObserver {
this._dompc._onAddIceCandidateError(this.newError(message, code));
}
onIceCandidate(sdpMLineIndex, sdpMid, candidate, ufrag) {
onIceCandidate(sdpMLineIndex, sdpMid, candidate, usernameFragment) {
let win = this._dompc._win;
if (candidate) {
if (candidate || sdpMid || usernameFragment) {
if (candidate.includes(" typ relay ")) {
this._dompc._iceGatheredRelayCandidates = true;
}
candidate = new win.RTCIceCandidate({ candidate, sdpMid, sdpMLineIndex, ufrag });
candidate = new win.RTCIceCandidate({ candidate, sdpMid, sdpMLineIndex, usernameFragment });
} else {
candidate = null;
}