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) { setNickname: function (nickname) {
// FIXME check if room is available etc. // FIXME check if room is available etc.
room.setDisplayName(nickname); 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); drawContext.drawImage(canvasCache, 0, 0);
if(resourceJid === AudioLevels.LOCAL_LEVEL) { if(resourceJid === AudioLevels.LOCAL_LEVEL) {
if(!APP.xmpp.myJid()) { resourceJid = APP.conference.localId();
if (!resourceJid) {
return; return;
} }
resourceJid = APP.xmpp.myResource();
} }
if(resourceJid === largeVideoResourceJid) { if(resourceJid === largeVideoResourceJid) {
@ -224,10 +224,12 @@ var AudioLevels = (function(my) {
function getVideoSpanId(resourceJid) { function getVideoSpanId(resourceJid) {
var videoSpanId = null; var videoSpanId = null;
if (resourceJid === AudioLevels.LOCAL_LEVEL || if (resourceJid === AudioLevels.LOCAL_LEVEL ||
(APP.xmpp.myResource() && resourceJid === APP.xmpp.myResource())) (APP.conference.localId() && resourceJid === APP.conference.localId())) {
videoSpanId = 'localVideoContainer'; videoSpanId = 'localVideoContainer';
else }
else {
videoSpanId = 'participant_' + resourceJid; videoSpanId = 'participant_' + resourceJid;
}
return videoSpanId; return videoSpanId;
} }

View File

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