Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(MessageHandler): suppress the notifications on top of the overlay
paweldomas210605d8f3a7
diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex ea289baef9..144fef378d 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -1450,12 +1450,15 @@ UI.hideRingOverLay = function () {};/**- * Indicates if the ring overlay is currently visible.+ * Indicates if any the "top" overlays are currently visible. The check includes+ * the call overlay, GUM permissions overlay and a page reload overlay.*- * @returns {*|boolean} {true} if the ring overlay is visible, {false} otherwise+ * @returns {*|boolean} {true} if the overlay is visible, {false} otherwise*/-UI.isRingOverlayVisible = function () {- return RingOverlay.isVisible();+UI.isOverlayVisible = function () {+ return RingOverlay.isVisible()+ || PageReloadOverlay.isVisible()+ || GumPermissionsOverlay.isVisible();};/**diff --git a/modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js b/modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.jsindex 55b3bf902e..d25880ba28 100644--- a/modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js+++ b/modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js@@ -23,6 +23,14 @@ function buildOverlayHtml(browser) {}export default {+ /**+ * Checks whether the overlay is currently visible.+ * @return {boolean} <tt>true</tt> if the overlay is visible+ * or <tt>false</tt> otherwise.+ */+ isVisible () {+ return $overlay && $overlay.parents('body').length > 0;+ },/*** Shows browser-specific overlay with guidance how to proceed with* gUM prompt.@@ -32,7 +40,7 @@ export default {show(browser) {!$overlay && buildOverlayHtml(browser);- !$overlay.parents('body').length && $overlay.appendTo('body');+ !this.isVisible() && $overlay.appendTo('body');},/**diff --git a/modules/UI/reload_overlay/PageReloadOverlay.js b/modules/UI/reload_overlay/PageReloadOverlay.jsindex 21edbbd5e7..15436597bf 100644--- a/modules/UI/reload_overlay/PageReloadOverlay.js+++ b/modules/UI/reload_overlay/PageReloadOverlay.js@@ -86,6 +86,14 @@ function start(timeoutSeconds) {}export default {+ /**+ * Checks whether the page reload overlay has been displayed.+ * @return {boolean} <tt>true</tt> if the page reload overlay is currently+ * visible or <tt>false</tt> otherwise.+ */+ isVisible() {+ return $overlay && $overlay.parents('body').length > 0;+ },/*** Shows the page reload overlay which will do the conference reload after* the given amount of time.@@ -97,7 +105,7 @@ export default {!$overlay && buildReloadOverlayHtml();- if (!$overlay.parents('body').length) {+ if (!this.isVisible()) {$overlay.appendTo('body');start(timeoutSeconds);}diff --git a/modules/UI/util/MessageHandler.js b/modules/UI/util/MessageHandler.jsindex 319a459e3a..0a478a5996 100644--- a/modules/UI/util/MessageHandler.js+++ b/modules/UI/util/MessageHandler.js@@ -333,7 +333,7 @@ var messageHandler = {messageArguments, options) {// If we're in ringing state we skip all toaster notifications.- if(!notificationsEnabled || APP.UI.isRingOverlayVisible())+ if(!notificationsEnabled || APP.UI.isOverlayVisible())return;var displayNameSpan = '<span class="nickname" ';