Merge pull request #442 from isymchych/lib-jitsi-meet

Lib-jitsi-meet imrovements
This commit is contained in:
hristoterezov 2015-12-29 22:00:29 -06:00
commit fc5e22ac29
3 changed files with 865 additions and 503 deletions

View File

@ -330,7 +330,7 @@ JitsiConference.prototype.lock = function (password) {
var conference = this;
return new Promise(function (resolve, reject) {
conference.xmpp.lockRoom(password, function () {
conference.room.lockRoom(password || "", function () {
resolve();
}, function (err) {
reject(err);
@ -345,7 +345,7 @@ JitsiConference.prototype.lock = function (password) {
* @returns {Promise}
*/
JitsiConference.prototype.unlock = function () {
return this.lock(undefined);
return this.lock();
};
/**
@ -401,7 +401,7 @@ JitsiConference.prototype.kickParticipant = function (id) {
JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
var id = Strophe.getResourceFromJid(jid);
if (id === 'focus') {
if (id === 'focus' || this.myUserId() === id) {
return;
}
var participant = new JitsiParticipant(jid, this, nick);

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
/* global $, $iq, APP, config, messageHandler,
roomName, sessionTerminated, Strophe, Util */
/* global $, $iq, Promise, Strophe */
var logger = require("jitsi-meet-logger").getLogger(__filename);
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
@ -354,6 +353,22 @@ Moderator.prototype.allocateConferenceFocus = function (callback) {
);
};
Moderator.prototype.authenticate = function () {
var self = this;
return new Promise(function (resolve, reject) {
self.connection.sendIQ(
self.createConferenceIq(),
function (result) {
self.parseSessionId(result);
resolve();
}, function (error) {
var code = $(error).find('>error').attr('code');
reject(error, code);
}
);
});
};
Moderator.prototype.getLoginUrl = function (urlCallback, failureCallback) {
var iq = $iq({to: this.getFocusComponent(), type: 'get'});
iq.c('login-url', {