do not use xmpp module in AudioLevels

This commit is contained in:
isymchych 2015-12-01 11:12:40 +02:00
parent 4ef57ceada
commit c21c9ce1b8
3 changed files with 15 additions and 6 deletions

8
app.js
View File

@ -37,6 +37,14 @@ function createConference(connection, room) {
setNickname: function (nickname) {
// FIXME check if room is available etc.
room.setDisplayName(nickname);
},
isModerator: function () {
return false;
},
myJid: function () {
return room.myUserId();
}
};
}

View File

@ -109,10 +109,10 @@ var AudioLevels = (function(my) {
drawContext.drawImage(canvasCache, 0, 0);
if(resourceJid === AudioLevels.LOCAL_LEVEL) {
if(!APP.xmpp.myJid()) {
resourceJid = APP.conference.localId();
if (!resourceJid) {
return;
}
resourceJid = APP.xmpp.myResource();
}
if(resourceJid === largeVideoResourceJid) {
@ -224,10 +224,12 @@ var AudioLevels = (function(my) {
function getVideoSpanId(resourceJid) {
var videoSpanId = null;
if (resourceJid === AudioLevels.LOCAL_LEVEL ||
(APP.xmpp.myResource() && resourceJid === APP.xmpp.myResource()))
(APP.conference.localId() && resourceJid === APP.conference.localId())) {
videoSpanId = 'localVideoContainer';
else
}
else {
videoSpanId = 'participant_' + resourceJid;
}
return videoSpanId;
}

View File

@ -75,8 +75,7 @@ var ToolbarToggler = {
toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
}
if (APP.xmpp.isModerator())
{
if (APP.conference.isModerator()) {
// TODO: Enable settings functionality.
// Need to uncomment the settings button in index.html.
// $('#settingsButton').css({visibility:"visible"});