зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1815263: Don't warn about a lack of STUN servers if we have a TURN UDP server. r=dbaker
Differential Revision: https://phabricator.services.mozilla.com/D169105
This commit is contained in:
Родитель
d019b30646
Коммит
215043a63d
|
@ -740,7 +740,7 @@ class RTCPeerConnection {
|
|||
}
|
||||
urls
|
||||
.map(url => nicerNewURI(url))
|
||||
.forEach(({ scheme, spec }) => {
|
||||
.forEach(({ scheme, spec, query }) => {
|
||||
if (scheme in { turn: 1, turns: 1 }) {
|
||||
if (username == undefined) {
|
||||
throw new this._win.DOMException(
|
||||
|
@ -768,6 +768,11 @@ class RTCPeerConnection {
|
|||
);
|
||||
}
|
||||
this._hasTurnServer = true;
|
||||
// If this is not a TURN TCP/TLS server, it is also a STUN server
|
||||
const parameters = query.split("&");
|
||||
if (!parameters.includes("transport=tcp")) {
|
||||
this._hasStunServer = true;
|
||||
}
|
||||
stunServers += 1;
|
||||
} else if (scheme in { stun: 1, stuns: 1 }) {
|
||||
this._hasStunServer = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче