瀏覽代碼

Fixes issues related to PR #451

dev1
hristoterezov 9 年之前
父節點
當前提交
211da9b641
共有 6 個檔案被更改,包括 260 行新增196 行删除
  1. 1
    6
      JitsiConference.js
  2. 1
    1
      JitsiConferenceErrors.js
  3. 4
    5
      JitsiConferenceEvents.js
  4. 2
    2
      doc/API.md
  5. 236
    166
      lib-jitsi-meet.js
  6. 16
    16
      lib-jitsi-meet.min.js

+ 1
- 6
JitsiConference.js 查看文件

5
 var XMPPEvents = require("./service/xmpp/XMPPEvents");
5
 var XMPPEvents = require("./service/xmpp/XMPPEvents");
6
 var AuthenticationEvents = require("./service/authentication/AuthenticationEvents");
6
 var AuthenticationEvents = require("./service/authentication/AuthenticationEvents");
7
 var RTCEvents = require("./service/RTC/RTCEvents");
7
 var RTCEvents = require("./service/RTC/RTCEvents");
8
-var DSEvents = require("./service/desktopsharing/DesktopSharingEventTypes");
9
 var EventEmitter = require("events");
8
 var EventEmitter = require("events");
10
 var JitsiConferenceEvents = require("./JitsiConferenceEvents");
9
 var JitsiConferenceEvents = require("./JitsiConferenceEvents");
11
 var JitsiConferenceErrors = require("./JitsiConferenceErrors");
10
 var JitsiConferenceErrors = require("./JitsiConferenceErrors");
819
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CONFERENCE_DESTROYED, reason);
818
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CONFERENCE_DESTROYED, reason);
820
     });
819
     });
821
     conference.room.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, function (err, msg) {
820
     conference.room.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, function (err, msg) {
822
-        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CHAT_ERROR, err, msg);
821
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_ERROR, JitsiConferenceErrors.CHAT_ERROR, err, msg);
823
     });
822
     });
824
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
823
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
825
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
824
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
885
         conference.eventEmitter.emit(JitsiConferenceEvents.USER_STATUS_CHANGED, id, status);
884
         conference.eventEmitter.emit(JitsiConferenceEvents.USER_STATUS_CHANGED, id, status);
886
     });
885
     });
887
 
886
 
888
-    conference.rtc.addListener(DSEvents.FIREFOX_EXTENSION_NEEDED, function (url) {
889
-        conference.eventEmitter.emit(JitsiConferenceEvents.FIREFOX_EXTENSION_NEEDED, url);
890
-    });
891
-
892
     conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {
887
     conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) {
893
         if(conference.lastDominantSpeaker !== id && conference.room) {
888
         if(conference.lastDominantSpeaker !== id && conference.room) {
894
             conference.lastDominantSpeaker = id;
889
             conference.lastDominantSpeaker = id;

+ 1
- 1
JitsiConferenceErrors.js 查看文件

45
      */
45
      */
46
     CONFERENCE_DESTROYED: "conference.destroyed",
46
     CONFERENCE_DESTROYED: "conference.destroyed",
47
     /**
47
     /**
48
-     * Indicates that chat error occured.
48
+     * Indicates that chat error occurred.
49
      */
49
      */
50
     CHAT_ERROR: "conference.chatError",
50
     CHAT_ERROR: "conference.chatError",
51
     /**
51
     /**

+ 4
- 5
JitsiConferenceEvents.js 查看文件

76
      * Indicates that conference failed.
76
      * Indicates that conference failed.
77
      */
77
      */
78
     CONFERENCE_FAILED: "conference.failed",
78
     CONFERENCE_FAILED: "conference.failed",
79
+    /**
80
+     * Indicates that an error occured.
81
+     */
82
+    CONFERENCE_ERROR: "conference.error",
79
     /**
83
     /**
80
      * Indicates that conference has been joined.
84
      * Indicates that conference has been joined.
81
      */
85
      */
108
      * Indicates that phone number changed.
112
      * Indicates that phone number changed.
109
      */
113
      */
110
     PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged",
114
     PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged",
111
-    /**
112
-     * Indicates that to proceed with screen sharing
113
-     * browser extension must be installed first.
114
-     */
115
-    FIREFOX_EXTENSION_NEEDED: "conference.firefoxExtensionRequired",
116
     /**
115
     /**
117
      * Indicates that available devices changed.
116
      * Indicates that available devices changed.
118
      */
117
      */

+ 2
- 2
doc/API.md 查看文件

91
         - USER_ROLE_CHANGED - notifies that role of some user changed. (parameters - id(string), role(string))
91
         - USER_ROLE_CHANGED - notifies that role of some user changed. (parameters - id(string), role(string))
92
         - USER_STATUS_CHANGED - notifies that status of some user changed. (parameters - id(string), status(string))
92
         - USER_STATUS_CHANGED - notifies that status of some user changed. (parameters - id(string), status(string))
93
         - CONFERENCE_FAILED - notifies that user failed to join the conference. (parameters - errorCode(JitsiMeetJS.errors.conference))
93
         - CONFERENCE_FAILED - notifies that user failed to join the conference. (parameters - errorCode(JitsiMeetJS.errors.conference))
94
+        - CONFERENCE_ERROR - notifies that error occurred. (parameters - errorCode(JitsiMeetJS.errors.conference))
94
         - KICKED - notifies that user has been kicked from the conference.
95
         - KICKED - notifies that user has been kicked from the conference.
95
         - START_MUTED_POLICY_CHANGED - notifies that all new participants will join with muted audio/video stream (parameters - JS object with 2 properties - audio(boolean), video(boolean))
96
         - START_MUTED_POLICY_CHANGED - notifies that all new participants will join with muted audio/video stream (parameters - JS object with 2 properties - audio(boolean), video(boolean))
96
         - STARTED_MUTED - notifies that the local user has started muted
97
         - STARTED_MUTED - notifies that the local user has started muted
97
-        - FIREFOX_EXTENSION_NEEDED - notifies that browser extension must be installed to proceed with screen sharing (parameters - extension url(string))
98
         - AVAILABLE_DEVICES_CHANGED - notifies that available participant devices changed (camera or microphone was added or removed) (parameters - id(string), devices(JS object with 2 properties - audio(boolean), video(boolean)))
98
         - AVAILABLE_DEVICES_CHANGED - notifies that available participant devices changed (camera or microphone was added or removed) (parameters - id(string), devices(JS object with 2 properties - audio(boolean), video(boolean)))
99
 
99
 
100
     2. connection
100
     2. connection
106
 * ```JitsiMeetJS.errors``` - JS object that contains all errors used by the API. You can use that object to check the reported errors from the API
106
 * ```JitsiMeetJS.errors``` - JS object that contains all errors used by the API. You can use that object to check the reported errors from the API
107
     We have two error types - connection and conference. You can access the events with the following code ```JitsiMeetJS.errors.<error_type>.<error_name>```.
107
     We have two error types - connection and conference. You can access the events with the following code ```JitsiMeetJS.errors.<error_type>.<error_name>```.
108
     For example if you want to use the conference event that is fired when somebody leave conference you can use the following code - ```JitsiMeetJS.errors.conference.PASSWORD_REQUIRED```.
108
     For example if you want to use the conference event that is fired when somebody leave conference you can use the following code - ```JitsiMeetJS.errors.conference.PASSWORD_REQUIRED```.
109
-    We support the following events:
109
+    We support the following errors:
110
     1. conference
110
     1. conference
111
         - CONNECTION_ERROR - the connection with the conference is lost.
111
         - CONNECTION_ERROR - the connection with the conference is lost.
112
         - SETUP_FAILED - conference setup failed
112
         - SETUP_FAILED - conference setup failed

+ 236
- 166
lib-jitsi-meet.js
文件差異過大導致無法顯示
查看文件


+ 16
- 16
lib-jitsi-meet.min.js
文件差異過大導致無法顯示
查看文件


Loading…
取消
儲存