Pārlūkot izejas kodu

Merge pull request #521 from jitsi/stun-turn-4p2p

ref: Use STUN/TURN for the P2P connection.
dev1
Saúl Ibarra Corretgé 8 gadus atpakaļ
vecāks
revīzija
e47f1ecd0c
2 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 9
    1
      modules/xmpp/strophe.jingle.js
  2. 1
    1
      modules/xmpp/xmpp.js

+ 9
- 1
modules/xmpp/strophe.jingle.js Parādīt failu

356
                     }
356
                     }
357
                     }
357
                     }
358
                 });
358
                 });
359
-                this.jvbIceConfig.iceServers = iceservers;
359
+
360
+                if (this.xmpp.options.useStunTurn) {
361
+                    this.jvbIceConfig.iceServers = iceservers;
362
+                }
363
+
364
+                if (this.xmpp.options.p2p.useStunTurn) {
365
+                    this.p2pIceConfig.iceServers = iceservers;
366
+                }
367
+
360
             }, err => {
368
             }, err => {
361
                 logger.warn('getting turn credentials failed', err);
369
                 logger.warn('getting turn credentials failed', err);
362
                 logger.warn('is mod_turncredentials or similar installed?');
370
                 logger.warn('is mod_turncredentials or similar installed?');

+ 1
- 1
modules/xmpp/xmpp.js Parādīt failu

133
             now);
133
             now);
134
         if (status === Strophe.Status.CONNECTED
134
         if (status === Strophe.Status.CONNECTED
135
             || status === Strophe.Status.ATTACHED) {
135
             || status === Strophe.Status.ATTACHED) {
136
-            if (this.options.useStunTurn) {
136
+            if (this.options.useStunTurn || this.options.p2p.useStunTurn) {
137
                 this.connection.jingle.getStunAndTurnCredentials();
137
                 this.connection.jingle.getStunAndTurnCredentials();
138
             }
138
             }
139
 
139
 

Notiek ielāde…
Atcelt
Saglabāt