From a182f53cdcd38599c5c85b9e13dbbecfa1933fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 8 Dec 2021 11:23:01 +0100 Subject: [PATCH] fix(virtual-backgrounds) fix error if we failed to load the model If another try is made, show an error notification instead of failing with an exception. --- react/features/stream-effects/virtual-background/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/react/features/stream-effects/virtual-background/index.js b/react/features/stream-effects/virtual-background/index.js index 56bacf20f5..e1de56d52b 100644 --- a/react/features/stream-effects/virtual-background/index.js +++ b/react/features/stream-effects/virtual-background/index.js @@ -74,6 +74,12 @@ export async function createVirtualBackgroundEffect(virtualBackground: Object, d return; } + } else if (isWasmDisabled) { + dispatch(showWarningNotification({ + titleKey: 'virtualBackground.backgroundEffectError' + }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + + return; } const modelBufferOffset = tflite._getModelBufferMemoryOffset();