Fixes handling of "bridgeIsDown" presence extension coming from focus participant.

This commit is contained in:
paweldomas 2014-12-08 16:38:56 +01:00
parent 28e41f6c7b
commit e4154c055e
1 changed files with 12 additions and 5 deletions

17
app.js
View File

@ -854,6 +854,18 @@ $(document).bind('left.muc', function (event, jid) {
$(document).bind('presence.muc', function (event, jid, info, pres) {
//check if the video bridge is available
if($(pres).find(">bridgeIsDown").length > 0 && !bridgeIsDown) {
bridgeIsDown = true;
messageHandler.showError("Error",
"Jitsi Videobridge is currently unavailable. Please try again later!");
}
if (info.isFocus)
{
return;
}
// Remove old ssrcs coming from the jid
Object.keys(ssrc2jid).forEach(function (ssrc) {
if (ssrc2jid[ssrc] == jid) {
@ -893,11 +905,6 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
if (displayName && displayName.length > 0)
$(document).trigger('displaynamechanged',
[jid, displayName]);
if (info.isFocus)
{
return;
}
/*if (focus !== null && info.displayName !== null) {
focus.setEndpointDisplayName(jid, info.displayName);
}*/