Browse Source

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

dev1
damencho 9 years ago
parent
commit
81b294e47d
3 changed files with 46 additions and 0 deletions
  1. 10
    0
      JitsiConference.js
  2. 27
    0
      lib-jitsi-meet.js
  3. 9
    0
      modules/xmpp/ChatRoom.js

+ 10
- 0
JitsiConference.js View File

493
     return null;
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
  * Setups the listeners needed for the conference.
507
  * Setups the listeners needed for the conference.
498
  * @param conference the conference
508
  * @param conference the conference

+ 27
- 0
lib-jitsi-meet.js View File

495
     return null;
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
  * Setups the listeners needed for the conference.
509
  * Setups the listeners needed for the conference.
500
  * @param conference the conference
510
  * @param conference the conference
6543
     return this.phonePin;
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
 module.exports = ChatRoom;
6565
 module.exports = ChatRoom;
6547
 
6566
 
6548
 }).call(this,"/modules/xmpp/ChatRoom.js")
6567
 }).call(this,"/modules/xmpp/ChatRoom.js")
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
 module.exports = JingleSessionPC;
8342
 module.exports = JingleSessionPC;
8316
 
8343
 
8317
 }).call(this,"/modules/xmpp/JingleSessionPC.js")
8344
 }).call(this,"/modules/xmpp/JingleSessionPC.js")

+ 9
- 0
modules/xmpp/ChatRoom.js View File

741
     return this.phonePin;
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
 module.exports = ChatRoom;
753
 module.exports = ChatRoom;

Loading…
Cancel
Save