remove old nick when adding new one

This commit is contained in:
isymchych 2015-12-18 15:58:40 +02:00
parent 9960ce703f
commit ae394408e6
2 changed files with 15 additions and 0 deletions

View File

@ -211,6 +211,9 @@ JitsiConference.prototype.removeCommand = function (name) {
*/
JitsiConference.prototype.setDisplayName = function(name) {
if(this.room){
// remove previously set nickname
this.room.removeFromPresence("nick");
this.room.addToPresence("nick", {attributes: {xmlns: 'http://jabber.org/protocol/nick'}, value: name});
this.room.sendPresence();
}

View File

@ -213,6 +213,9 @@ JitsiConference.prototype.removeCommand = function (name) {
*/
JitsiConference.prototype.setDisplayName = function(name) {
if(this.room){
// remove previously set nickname
this.room.removeFromPresence("nick");
this.room.addToPresence("nick", {attributes: {xmlns: 'http://jabber.org/protocol/nick'}, value: name});
this.room.sendPresence();
}
@ -959,9 +962,18 @@ var LibJitsiMeet = {
return tracks;
});
},
/**
* Checks if its possible to enumerate available cameras/micropones.
* @returns {boolean} true if available, false otherwise.
*/
isDeviceListAvailable: function () {
return RTC.isDeviceListAvailable();
},
/**
* Returns true if changing the camera / microphone device is supported and
* false if not.
* @returns {boolean} true if available, false otherwise.
*/
isDeviceChangeAvailable: function () {
return RTC.isDeviceChangeAvailable();
},