From e4154c055e4d1ca8b48f6e27a242810eab63770d Mon Sep 17 00:00:00 2001 From: paweldomas Date: Mon, 8 Dec 2014 16:38:56 +0100 Subject: [PATCH] Fixes handling of "bridgeIsDown" presence extension coming from focus participant. --- app.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 5d6d2b210..68ae5a160 100644 --- a/app.js +++ b/app.js @@ -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); }*/