Ver código fonte

Adds method to expose internal state - iceConnectionState, which later will be used by torture.

master
damencho 9 anos atrás
pai
commit
81b294e47d
3 arquivos alterados com 46 adições e 0 exclusões
  1. 10
    0
      JitsiConference.js
  2. 27
    0
      lib-jitsi-meet.js
  3. 9
    0
      modules/xmpp/ChatRoom.js

+ 10
- 0
JitsiConference.js Ver arquivo

@@ -493,6 +493,16 @@ JitsiConference.prototype.getPhonePin = function () {
493 493
     return null;
494 494
 }
495 495
 
496
+/**
497
+ * Returns the connection state for the current room. Its ice connection state
498
+ * for its session.
499
+ */
500
+JitsiConference.prototype.getConnectionState = function () {
501
+    if(this.room)
502
+        return this.room.getConnectionState();
503
+    return null;
504
+}
505
+
496 506
 /**
497 507
  * Setups the listeners needed for the conference.
498 508
  * @param conference the conference

+ 27
- 0
lib-jitsi-meet.js Ver arquivo

@@ -495,6 +495,16 @@ JitsiConference.prototype.getPhonePin = function () {
495 495
     return null;
496 496
 }
497 497
 
498
+/**
499
+ * Returns the connection state for the current room. Its ice connection state
500
+ * for its session.
501
+ */
502
+JitsiConference.prototype.getConnectionState = function () {
503
+    if(this.room)
504
+        return this.room.getConnectionState();
505
+    return null;
506
+}
507
+
498 508
 /**
499 509
  * Setups the listeners needed for the conference.
500 510
  * @param conference the conference
@@ -6543,6 +6553,15 @@ ChatRoom.prototype.getPhonePin = function () {
6543 6553
     return this.phonePin;
6544 6554
 }
6545 6555
 
6556
+/**
6557
+ * Returns the connection state for the current session.
6558
+ */
6559
+ChatRoom.prototype.getConnectionState = function () {
6560
+    if(!this.session)
6561
+        return null;
6562
+    return this.session.getIceConnectionState();
6563
+}
6564
+
6546 6565
 module.exports = ChatRoom;
6547 6566
 
6548 6567
 }).call(this,"/modules/xmpp/ChatRoom.js")
@@ -8312,6 +8331,14 @@ JingleSessionPC.prototype.remoteStreamAdded = function (data, times) {
8312 8331
     }
8313 8332
 }
8314 8333
 
8334
+/**
8335
+ * Returns the ice connection state for the peer connection.
8336
+ * @returns the ice connection state for the peer connection.
8337
+ */
8338
+JingleSessionPC.prototype.getIceConnectionState = function () {
8339
+    return this.peerconnection.iceConnectionState;
8340
+}
8341
+
8315 8342
 module.exports = JingleSessionPC;
8316 8343
 
8317 8344
 }).call(this,"/modules/xmpp/JingleSessionPC.js")

+ 9
- 0
modules/xmpp/ChatRoom.js Ver arquivo

@@ -741,4 +741,13 @@ ChatRoom.prototype.getPhonePin = function () {
741 741
     return this.phonePin;
742 742
 }
743 743
 
744
+/**
745
+ * Returns the connection state for the current session.
746
+ */
747
+ChatRoom.prototype.getConnectionState = function () {
748
+    if(!this.session)
749
+        return null;
750
+    return this.session.getIceConnectionState();
751
+}
752
+
744 753
 module.exports = ChatRoom;

Carregando…
Cancelar
Salvar