Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

map tcptype for tcp candidates

Philipp Hancke0d0c1b951648
diff --git a/libs/strophe/strophe.jingle.sdp.util.js b/libs/strophe/strophe.jingle.sdp.util.js
index e76ddb1ed3..e57e584a06 100644
--- a/libs/strophe/strophe.jingle.sdp.util.js
+++ b/libs/strophe/strophe.jingle.sdp.util.js
@@ -174,6 +174,9 @@ SDPUtil = {
case 'generation':
candidate.generation = elems[i + 1];
break;
+ case 'tcptype':
+ candidate.tcptype = elems[i + 1];
+ break;
default: // TODO
console.log('parse_icecandidate not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
}
@@ -201,6 +204,11 @@ SDPUtil = {
}
break;
}
+ if (cand.hasOwnAttribute('tcptype')) {
+ line += 'tcptype';
+ line += ' ';
+ line += cand.tcptype;
+ }
line += 'generation';
line += ' ';
line += cand.hasOwnAttribute('generation') ? cand.generation : '0';
@@ -283,7 +291,7 @@ SDPUtil = {
candidateToJingle: function (line) {
// a=candidate:2979166662 1 udp 2113937151 192.168.2.100 57698 typ host generation 0
// <candidate component=... foundation=... generation=... id=... ip=... network=... port=... priority=... protocol=... type=.../>
- if (line.indexOf('candidate:') == 0) {
+ if (line.indexOf('candidate:') === 0) {
line = 'a=' + line;
} else if (line.substring(0, 12) != 'a=candidate:') {
console.log('parseCandidate called with a line that is not a candidate line');
@@ -321,6 +329,9 @@ SDPUtil = {
case 'generation':
candidate.generation = elems[i + 1];
break;
+ case 'tcptype':
+ candidate.tcptype = elems[i + 1];
+ break;
default: // TODO
console.log('not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
}