Bladeren bron

ES6 for JitsiConnectionEvents

master
Lyubomir Marinov 9 jaren geleden
bovenliggende
commit
27840ba13a
4 gewijzigde bestanden met toevoegingen van 32 en 36 verwijderingen
  1. 1
    1
      JitsiConnection.js
  2. 29
    33
      JitsiConnectionEvents.js
  3. 1
    1
      JitsiMeetJS.js
  4. 1
    1
      modules/xmpp/xmpp.js

+ 1
- 1
JitsiConnection.js Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 var JitsiConference = require("./JitsiConference");
2 2
 var XMPP = require("./modules/xmpp/xmpp");
3
-var JitsiConnectionEvents = require("./JitsiConnectionEvents");
3
+import * as JitsiConnectionEvents from "./JitsiConnectionEvents";
4 4
 var JitsiConnectionErrors = require("./JitsiConnectionErrors");
5 5
 var Statistics = require("./modules/statistics/statistics");
6 6
 

+ 29
- 33
JitsiConnectionEvents.js Bestand weergeven

@@ -1,36 +1,32 @@
1 1
 /**
2
- * Enumeration with the events for the connection.
3
- * @type {{string: string}}
2
+ * The events for the connection.
4 3
  */
5
-var JitsiConnnectionEvents = {
6
-    /**
7
-     * Indicates that the connection has been failed for some reason. The event
8
-     * proivdes the following parameters to its listeners:
9
-     *
10
-     * @param err {string} the error (message) associated with the failure
11
-     */
12
-    CONNECTION_FAILED: "connection.connectionFailed",
13
-    /**
14
-     * Indicates that the connection has been established. The event provides
15
-     * the following parameters to its listeners:
16
-     *
17
-     * @param id {string} the ID of the local endpoint/participant/peer (within
18
-     * the context of the established connection)
19
-     */
20
-    CONNECTION_ESTABLISHED: "connection.connectionEstablished",
21
-    /**
22
-     * Indicates that the connection has been disconnected. The event provides
23
-     * the following parameters to its listeners:
24
-     *
25
-     * @param msg {string} a message associated with the disconnect such as the
26
-     * last (known) error message
27
-     */
28
-    CONNECTION_DISCONNECTED: "connection.connectionDisconnected",
29
-    /**
30
-     * Indicates that the perfomed action cannot be executed because the
31
-     * connection is not in the correct state(connected, disconnected, etc.)
32
-     */
33
-    WRONG_STATE: "connection.wrongState"
34
-};
35 4
 
36
-module.exports = JitsiConnnectionEvents;
5
+/**
6
+ * Indicates that the connection has been disconnected. The event provides
7
+ * the following parameters to its listeners:
8
+ *
9
+ * @param msg {string} a message associated with the disconnect such as the
10
+ * last (known) error message
11
+ */
12
+export const CONNECTION_DISCONNECTED = "connection.connectionDisconnected";
13
+/**
14
+ * Indicates that the connection has been established. The event provides
15
+ * the following parameters to its listeners:
16
+ *
17
+ * @param id {string} the ID of the local endpoint/participant/peer (within
18
+ * the context of the established connection)
19
+ */
20
+export const CONNECTION_ESTABLISHED = "connection.connectionEstablished";
21
+/**
22
+ * Indicates that the connection has been failed for some reason. The event
23
+ * proivdes the following parameters to its listeners:
24
+ *
25
+ * @param err {string} the error (message) associated with the failure
26
+ */
27
+export const CONNECTION_FAILED = "connection.connectionFailed";
28
+/**
29
+ * Indicates that the perfomed action cannot be executed because the
30
+ * connection is not in the correct state(connected, disconnected, etc.)
31
+ */
32
+export const WRONG_STATE = "connection.wrongState";

+ 1
- 1
JitsiMeetJS.js Bestand weergeven

@@ -3,7 +3,7 @@ var AuthUtil = require("./modules/util/AuthUtil");
3 3
 var JitsiConnection = require("./JitsiConnection");
4 4
 var JitsiMediaDevices = require("./JitsiMediaDevices");
5 5
 var JitsiConferenceEvents = require("./JitsiConferenceEvents");
6
-var JitsiConnectionEvents = require("./JitsiConnectionEvents");
6
+import * as JitsiConnectionEvents from "./JitsiConnectionEvents";
7 7
 var JitsiConnectionErrors = require("./JitsiConnectionErrors");
8 8
 var JitsiConferenceErrors = require("./JitsiConferenceErrors");
9 9
 import * as JitsiMediaDevicesEvents from "./JitsiMediaDevicesEvents";

+ 1
- 1
modules/xmpp/xmpp.js Bestand weergeven

@@ -7,7 +7,7 @@ var RandomUtil = require("../util/RandomUtil");
7 7
 var RTCEvents = require("../../service/RTC/RTCEvents");
8 8
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");
9 9
 var JitsiConnectionErrors = require("../../JitsiConnectionErrors");
10
-var JitsiConnectionEvents = require("../../JitsiConnectionEvents");
10
+import * as JitsiConnectionEvents from "../../JitsiConnectionEvents";
11 11
 var RTC = require("../RTC/RTC");
12 12
 var RTCBrowserType = require("../RTC/RTCBrowserType");
13 13
 

Laden…
Annuleren
Opslaan