Selaa lähdekoodia

add AUTH_STATUS_CHANGED event

dev1
isymchych 9 vuotta sitten
vanhempi
commit
ebd524c436
3 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 1
    0
      JitsiConference.js
  2. 5
    1
      JitsiConferenceEvents.js
  3. 1
    0
      doc/API.md

+ 1
- 0
JitsiConference.js Näytä tiedosto

970
     conference.room.addListener(AuthenticationEvents.IDENTITY_UPDATED, function (authEnabled, authIdentity) {
970
     conference.room.addListener(AuthenticationEvents.IDENTITY_UPDATED, function (authEnabled, authIdentity) {
971
         conference.authEnabled = authEnabled;
971
         conference.authEnabled = authEnabled;
972
         conference.authIdentity = authIdentity;
972
         conference.authIdentity = authIdentity;
973
+        conference.eventEmitter.emit(JitsiConferenceEvents.AUTH_STATUS_CHANGED, authEnabled, authIdentity);
973
     });
974
     });
974
 
975
 
975
     conference.room.addListener(XMPPEvents.MESSAGE_RECEIVED, function (jid, displayName, txt, myJid, ts) {
976
     conference.room.addListener(XMPPEvents.MESSAGE_RECEIVED, function (jid, displayName, txt, myJid, ts) {

+ 5
- 1
JitsiConferenceEvents.js Näytä tiedosto

119
     /**
119
     /**
120
      * Indicates that available devices changed.
120
      * Indicates that available devices changed.
121
      */
121
      */
122
-    AVAILABLE_DEVICES_CHANGED: "conference.availableDevicesChanged"
122
+    AVAILABLE_DEVICES_CHANGED: "conference.availableDevicesChanged",
123
+    /**
124
+     * Indicates that authentication status changed.
125
+     */
126
+    AUTH_STATUS_CHANGED: "conference.auth_status_changed"
123
 };
127
 };
124
 
128
 
125
 module.exports = JitsiConferenceEvents;
129
 module.exports = JitsiConferenceEvents;

+ 1
- 0
doc/API.md Näytä tiedosto

99
         - STARTED_MUTED - notifies that the local user has started muted
99
         - STARTED_MUTED - notifies that the local user has started muted
100
         - 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)))
100
         - 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)))
101
         - CONNECTION_STATS - New local connection statistics are received. (parameters - stats(object))
101
         - CONNECTION_STATS - New local connection statistics are received. (parameters - stats(object))
102
+        - AUTH_STATUS_CHANGED - notifies that authentication is enabled or disabled, or local user authenticated (logged in). (parameters - isAuthEnabled(boolean), authIdentity(string))
102
 
103
 
103
     2. connection
104
     2. connection
104
         - CONNECTION_FAILED - indicates that the server connection failed.
105
         - CONNECTION_FAILED - indicates that the server connection failed.

Loading…
Peruuta
Tallenna