|
|
@@ -14,11 +14,33 @@ import * as JitsiConferenceEvents from "../../JitsiConferenceEvents";
|
|
14
|
14
|
function ParticipantConnectionStatus(rtc, conference) {
|
|
15
|
15
|
this.rtc = rtc;
|
|
16
|
16
|
this.conference = conference;
|
|
17
|
|
- rtc.addListener(
|
|
18
|
|
- RTCEvents.ENDPOINT_CONN_STATUS_CHANGED,
|
|
19
|
|
- this.onEndpointConnStatusChanged.bind(this));
|
|
20
|
17
|
}
|
|
21
|
18
|
|
|
|
19
|
+/**
|
|
|
20
|
+ * Initializes <tt>ParticipantConnectionStatus</tt> and bind required event
|
|
|
21
|
+ * listeners.
|
|
|
22
|
+ */
|
|
|
23
|
+ParticipantConnectionStatus.prototype.init = function() {
|
|
|
24
|
+
|
|
|
25
|
+ this._onEndpointConnStatusChanged
|
|
|
26
|
+ = this.onEndpointConnStatusChanged.bind(this);
|
|
|
27
|
+
|
|
|
28
|
+ this.rtc.addListener(
|
|
|
29
|
+ RTCEvents.ENDPOINT_CONN_STATUS_CHANGED,
|
|
|
30
|
+ this._onEndpointConnStatusChanged);
|
|
|
31
|
+};
|
|
|
32
|
+
|
|
|
33
|
+/**
|
|
|
34
|
+ * Removes all event listeners and disposes of all resources held by this
|
|
|
35
|
+ * instance.
|
|
|
36
|
+ */
|
|
|
37
|
+ParticipantConnectionStatus.prototype.dispose = function () {
|
|
|
38
|
+
|
|
|
39
|
+ this.rtc.removeListener(
|
|
|
40
|
+ RTCEvents.ENDPOINT_CONN_STATUS_CHANGED,
|
|
|
41
|
+ this._onEndpointConnStatusChanged);
|
|
|
42
|
+};
|
|
|
43
|
+
|
|
22
|
44
|
/**
|
|
23
|
45
|
* Handles RTCEvents.ENDPOINT_CONN_STATUS_CHANGED triggered when we receive
|
|
24
|
46
|
* notification over the data channel from the bridge about endpoint's
|