|
@@ -5,6 +5,7 @@
|
5
|
5
|
var logger = require("jitsi-meet-logger").getLogger(__filename);
|
6
|
6
|
var RTC = require("./modules/RTC/RTC");
|
7
|
7
|
var XMPPEvents = require("./service/xmpp/XMPPEvents");
|
|
8
|
+var AuthenticationEvents = require("./service/authentication/AuthenticationEvents");
|
8
|
9
|
var RTCEvents = require("./service/RTC/RTCEvents");
|
9
|
10
|
var EventEmitter = require("events");
|
10
|
11
|
var JitsiConferenceEvents = require("./JitsiConferenceEvents");
|
|
@@ -213,6 +214,9 @@ JitsiConference.prototype.removeCommand = function (name) {
|
213
|
214
|
*/
|
214
|
215
|
JitsiConference.prototype.setDisplayName = function(name) {
|
215
|
216
|
if(this.room){
|
|
217
|
+ // remove previously set nickname
|
|
218
|
+ this.room.removeFromPresence("nick");
|
|
219
|
+
|
216
|
220
|
this.room.addToPresence("nick", {attributes: {xmlns: 'http://jabber.org/protocol/nick'}, value: name});
|
217
|
221
|
this.room.sendPresence();
|
218
|
222
|
}
|
|
@@ -559,6 +563,10 @@ function setupListeners(conference) {
|
559
|
563
|
conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.SETUP_FAILED);
|
560
|
564
|
});
|
561
|
565
|
|
|
566
|
+ conference.room.addListener(AuthenticationEvents.IDENTITY_UPDATED, function (authEnabled, authIdentity) {
|
|
567
|
+ console.error(authEnabled, authIdentity);
|
|
568
|
+ });
|
|
569
|
+
|
562
|
570
|
conference.room.addListener(XMPPEvents.MESSAGE_RECEIVED, function (jid, displayName, txt, myJid, ts) {
|
563
|
571
|
var id = Strophe.getResourceFromJid(jid);
|
564
|
572
|
conference.eventEmitter.emit(JitsiConferenceEvents.MESSAGE_RECEIVED, id, txt, ts);
|
|
@@ -609,7 +617,7 @@ function setupListeners(conference) {
|
609
|
617
|
module.exports = JitsiConference;
|
610
|
618
|
|
611
|
619
|
}).call(this,"/JitsiConference.js")
|
612
|
|
-},{"./JitsiConferenceErrors":2,"./JitsiConferenceEvents":3,"./JitsiParticipant":8,"./JitsiTrackEvents":10,"./modules/DTMF/JitsiDTMFManager":11,"./modules/RTC/RTC":16,"./modules/statistics/statistics":24,"./service/RTC/RTCEvents":79,"./service/xmpp/XMPPEvents":85,"events":43,"jitsi-meet-logger":47}],2:[function(require,module,exports){
|
|
620
|
+},{"./JitsiConferenceErrors":2,"./JitsiConferenceEvents":3,"./JitsiParticipant":8,"./JitsiTrackEvents":10,"./modules/DTMF/JitsiDTMFManager":11,"./modules/RTC/RTC":16,"./modules/statistics/statistics":24,"./service/RTC/RTCEvents":79,"./service/authentication/AuthenticationEvents":81,"./service/xmpp/XMPPEvents":85,"events":43,"jitsi-meet-logger":47}],2:[function(require,module,exports){
|
613
|
621
|
/**
|
614
|
622
|
* Enumeration with the errors for the conference.
|
615
|
623
|
* @type {{string: string}}
|
|
@@ -959,9 +967,21 @@ var LibJitsiMeet = {
|
959
|
967
|
return tracks;
|
960
|
968
|
});
|
961
|
969
|
},
|
|
970
|
+ /**
|
|
971
|
+ * Checks if its possible to enumerate available cameras/micropones.
|
|
972
|
+ * @returns {boolean} true if available, false otherwise.
|
|
973
|
+ */
|
962
|
974
|
isDeviceListAvailable: function () {
|
963
|
975
|
return RTC.isDeviceListAvailable();
|
964
|
976
|
},
|
|
977
|
+ /**
|
|
978
|
+ * Returns true if changing the camera / microphone device is supported and
|
|
979
|
+ * false if not.
|
|
980
|
+ * @returns {boolean} true if available, false otherwise.
|
|
981
|
+ */
|
|
982
|
+ isDeviceChangeAvailable: function () {
|
|
983
|
+ return RTC.isDeviceChangeAvailable();
|
|
984
|
+ },
|
965
|
985
|
enumerateDevices: function (callback) {
|
966
|
986
|
RTC.enumerateDevices(callback);
|
967
|
987
|
}
|
|
@@ -2046,10 +2066,21 @@ RTC.getVideoSrc = function (element) {
|
2046
|
2066
|
return RTCUtils.getVideoSrc(element);
|
2047
|
2067
|
};
|
2048
|
2068
|
|
|
2069
|
+/**
|
|
2070
|
+ * Returns true if retrieving the the list of input devices is supported and
|
|
2071
|
+ * false if not.
|
|
2072
|
+ */
|
2049
|
2073
|
RTC.isDeviceListAvailable = function () {
|
2050
|
2074
|
return RTCUtils.isDeviceListAvailable();
|
2051
|
2075
|
};
|
2052
|
2076
|
|
|
2077
|
+/**
|
|
2078
|
+ * Returns true if changing the camera / microphone device is supported and
|
|
2079
|
+ * false if not.
|
|
2080
|
+ */
|
|
2081
|
+RTC.isDeviceChangeAvailable = function () {
|
|
2082
|
+ return RTCUtils.isDeviceChangeAvailable();
|
|
2083
|
+}
|
2053
|
2084
|
/**
|
2054
|
2085
|
* Allows to receive list of available cameras/microphones.
|
2055
|
2086
|
* @param {function} callback would receive array of devices as an argument
|
|
@@ -3007,6 +3038,16 @@ var RTCUtils = {
|
3007
|
3038
|
}
|
3008
|
3039
|
return (MediaStreamTrack && MediaStreamTrack.getSources)? true : false;
|
3009
|
3040
|
},
|
|
3041
|
+ /**
|
|
3042
|
+ * Returns true if changing the camera / microphone device is supported and
|
|
3043
|
+ * false if not.
|
|
3044
|
+ */
|
|
3045
|
+ isDeviceChangeAvailable: function () {
|
|
3046
|
+ if(RTCBrowserType.isChrome() || RTCBrowserType.isOpera() ||
|
|
3047
|
+ RTCBrowserType.isTemasysPluginUsed())
|
|
3048
|
+ return true;
|
|
3049
|
+ return false;
|
|
3050
|
+ },
|
3010
|
3051
|
/**
|
3011
|
3052
|
* A method to handle stopping of the stream.
|
3012
|
3053
|
* One point to handle the differences in various implementations.
|