瀏覽代碼

ES6 for JitsiConferenceErrors

master
Lyubomir Marinov 9 年之前
父節點
當前提交
ad48c0c4d3
共有 4 個文件被更改,包括 67 次插入74 次删除
  1. 1
    1
      JitsiConference.js
  2. 64
    71
      JitsiConferenceErrors.js
  3. 1
    1
      JitsiConferenceEventManager.js
  4. 1
    1
      JitsiMeetJS.js

+ 1
- 1
JitsiConference.js 查看文件

@@ -4,8 +4,8 @@ var logger = require("jitsi-meet-logger").getLogger(__filename);
4 4
 var RTC = require("./modules/RTC/RTC");
5 5
 var XMPPEvents = require("./service/xmpp/XMPPEvents");
6 6
 var EventEmitter = require("events");
7
+import * as JitsiConferenceErrors from "./JitsiConferenceErrors";
7 8
 import * as JitsiConferenceEvents from "./JitsiConferenceEvents";
8
-var JitsiConferenceErrors = require("./JitsiConferenceErrors");
9 9
 var JitsiParticipant = require("./JitsiParticipant");
10 10
 var Statistics = require("./modules/statistics/statistics");
11 11
 var JitsiDTMFManager = require('./modules/DTMF/JitsiDTMFManager');

+ 64
- 71
JitsiConferenceErrors.js 查看文件

@@ -1,73 +1,66 @@
1 1
 /**
2
- * Enumeration with the errors for the conference.
3
- * @type {{string: string}}
4
- */
5
-var JitsiConferenceErrors = {
6
-    /**
7
-     * Indicates that a password is required in order to join the conference.
8
-     */
9
-    PASSWORD_REQUIRED: "conference.passwordRequired",
10
-    /**
11
-     * Indicates that client must be authenticated to create the conference.
12
-     */
13
-    AUTHENTICATION_REQUIRED: "conference.authenticationRequired",
14
-    /**
15
-     * Indicates that password cannot be set for this conference.
16
-     */
17
-    PASSWORD_NOT_SUPPORTED: "conference.passwordNotSupported",
18
-    /**
19
-     * Indicates that a connection error occurred when trying to join a
20
-     * conference.
21
-     */
22
-    CONNECTION_ERROR: "conference.connectionError",
23
-    /**
24
-     * Indicates that the conference setup failed.
25
-     */
26
-    SETUP_FAILED: "conference.setup_failed",
27
-    /**
28
-     * Indicates that there is no available videobridge.
29
-     */
30
-    VIDEOBRIDGE_NOT_AVAILABLE: "conference.videobridgeNotAvailable",
31
-    /**
32
-     * Indicates that reservation system returned error.
33
-     */
34
-    RESERVATION_ERROR: "conference.reservationError",
35
-    /**
36
-     * Indicates that graceful shutdown happened.
37
-     */
38
-    GRACEFUL_SHUTDOWN: "conference.gracefulShutdown",
39
-    /**
40
-     * Indicates that jingle fatal error happened.
41
-     */
42
-    JINGLE_FATAL_ERROR: "conference.jingleFatalError",
43
-    /**
44
-     * Indicates that conference has been destroyed.
45
-     */
46
-    CONFERENCE_DESTROYED: "conference.destroyed",
47
-    /**
48
-     * Indicates that chat error occurred.
49
-     */
50
-    CHAT_ERROR: "conference.chatError",
51
-    /**
52
-     * Indicates that focus error happened.
53
-     */
54
-    FOCUS_DISCONNECTED: "conference.focusDisconnected",
55
-    /**
56
-     * Indicates that focus left the conference.
57
-     */
58
-    FOCUS_LEFT: "conference.focusLeft",
59
-    /**
60
-     * Indicates that max users limit has been reached.
61
-     */
62
-    CONFERENCE_MAX_USERS: "conference.max_users",
63
-    /**
64
-     * Indicates that the versions of the server side components are
65
-     * incompatible with the client side.
66
-     */
67
-    INCOMPATIBLE_SERVER_VERSIONS: "conference.incompatible_server_versions"
68
-    /**
69
-     * Many more errors TBD here.
70
-     */
71
-};
2
+ * The errors for the conference.
3
+ */
72 4
 
73
-module.exports = JitsiConferenceErrors;
5
+/**
6
+ * Indicates that client must be authenticated to create the conference.
7
+ */
8
+export const AUTHENTICATION_REQUIRED = "conference.authenticationRequired";
9
+/**
10
+ * Indicates that chat error occurred.
11
+ */
12
+export const CHAT_ERROR = "conference.chatError";
13
+/**
14
+ * Indicates that conference has been destroyed.
15
+ */
16
+export const CONFERENCE_DESTROYED = "conference.destroyed";
17
+/**
18
+ * Indicates that max users limit has been reached.
19
+ */
20
+export const CONFERENCE_MAX_USERS = "conference.max_users";
21
+/**
22
+ * Indicates that a connection error occurred when trying to join a conference.
23
+ */
24
+export const CONNECTION_ERROR = "conference.connectionError";
25
+/**
26
+ * Indicates that focus error happened.
27
+ */
28
+export const FOCUS_DISCONNECTED = "conference.focusDisconnected";
29
+/**
30
+ * Indicates that focus left the conference.
31
+ */
32
+export const FOCUS_LEFT = "conference.focusLeft";
33
+/**
34
+ * Indicates that graceful shutdown happened.
35
+ */
36
+export const GRACEFUL_SHUTDOWN = "conference.gracefulShutdown";
37
+/**
38
+ * Indicates that the versions of the server side components are incompatible
39
+ * with the client side.
40
+ */
41
+export const INCOMPATIBLE_SERVER_VERSIONS
42
+    = "conference.incompatible_server_versions";
43
+/**
44
+ * Indicates that jingle fatal error happened.
45
+ */
46
+export const JINGLE_FATAL_ERROR = "conference.jingleFatalError";
47
+/**
48
+ * Indicates that password cannot be set for this conference.
49
+ */
50
+export const PASSWORD_NOT_SUPPORTED = "conference.passwordNotSupported";
51
+/**
52
+ * Indicates that a password is required in order to join the conference.
53
+ */
54
+export const PASSWORD_REQUIRED = "conference.passwordRequired";
55
+/**
56
+ * Indicates that reservation system returned error.
57
+ */
58
+export const RESERVATION_ERROR = "conference.reservationError";
59
+/**
60
+ * Indicates that the conference setup failed.
61
+ */
62
+export const SETUP_FAILED = "conference.setup_failed";
63
+/**
64
+ * Indicates that there is no available videobridge.
65
+ */
66
+export const VIDEOBRIDGE_NOT_AVAILABLE = "conference.videobridgeNotAvailable";

+ 1
- 1
JitsiConferenceEventManager.js 查看文件

@@ -3,8 +3,8 @@ var logger = require("jitsi-meet-logger").getLogger(__filename);
3 3
 var EventEmitterForwarder = require("./modules/util/EventEmitterForwarder");
4 4
 var XMPPEvents = require("./service/xmpp/XMPPEvents");
5 5
 var RTCEvents = require("./service/RTC/RTCEvents");
6
+import * as JitsiConferenceErrors from "./JitsiConferenceErrors";
6 7
 import * as JitsiConferenceEvents from "./JitsiConferenceEvents";
7
-var JitsiConferenceErrors = require("./JitsiConferenceErrors");
8 8
 var AuthenticationEvents =
9 9
     require("./service/authentication/AuthenticationEvents");
10 10
 var Statistics = require("./modules/statistics/statistics");

+ 1
- 1
JitsiMeetJS.js 查看文件

@@ -2,10 +2,10 @@ var logger = require("jitsi-meet-logger").getLogger(__filename);
2 2
 var AuthUtil = require("./modules/util/AuthUtil");
3 3
 var JitsiConnection = require("./JitsiConnection");
4 4
 var JitsiMediaDevices = require("./JitsiMediaDevices");
5
+import * as JitsiConferenceErrors from "./JitsiConferenceErrors";
5 6
 import * as JitsiConferenceEvents from "./JitsiConferenceEvents";
6 7
 import * as JitsiConnectionErrors from "./JitsiConnectionErrors";
7 8
 import * as JitsiConnectionEvents from "./JitsiConnectionEvents";
8
-var JitsiConferenceErrors = require("./JitsiConferenceErrors");
9 9
 import * as JitsiMediaDevicesEvents from "./JitsiMediaDevicesEvents";
10 10
 import JitsiTrackError from "./JitsiTrackError";
11 11
 import * as JitsiTrackErrors from "./JitsiTrackErrors";

Loading…
取消
儲存