fix(virtual-background) don't treat timeout as fatal failure
If downloading the model tiemouts, it may succeed in the (near) future, don't just give up.
This commit is contained in:
parent
f62cb7a0c7
commit
8e65fab544
|
@ -52,14 +52,13 @@ export async function createVirtualBackgroundEffect(virtualBackground: Object, d
|
||||||
tflite = await timeout(tfliteTimeout, createTFLiteModule());
|
tflite = await timeout(tfliteTimeout, createTFLiteModule());
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
isWasmDisabled = true;
|
|
||||||
|
|
||||||
if (err?.message === '408') {
|
if (err?.message === '408') {
|
||||||
logger.error('Failed to download tflite model!');
|
logger.error('Failed to download tflite model!');
|
||||||
dispatch(showWarningNotification({
|
dispatch(showWarningNotification({
|
||||||
titleKey: 'virtualBackground.backgroundEffectError'
|
titleKey: 'virtualBackground.backgroundEffectError'
|
||||||
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
|
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
|
||||||
} else {
|
} else {
|
||||||
|
isWasmDisabled = true;
|
||||||
logger.error('Looks like WebAssembly is disabled or not supported on this browser', err);
|
logger.error('Looks like WebAssembly is disabled or not supported on this browser', err);
|
||||||
dispatch(showWarningNotification({
|
dispatch(showWarningNotification({
|
||||||
titleKey: 'virtualBackground.webAssemblyWarning',
|
titleKey: 'virtualBackground.webAssemblyWarning',
|
||||||
|
|
Loading…
Reference in New Issue