Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(virtual-background): Add logs on virtual background actions.

tudordan7bb8c30a6c9b4
diff --git a/react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js b/react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js
index e75af97fec..64f14650a0 100644
--- a/react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js
+++ b/react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js
@@ -97,11 +97,7 @@ export default class JitsiStreamBackgroundEffect {
// Draw segmentation mask.
// Smooth out the edges.
- if (backgroundType === VIRTUAL_BACKGROUND_TYPE.IMAGE) {
- this._outputCanvasCtx.filter = 'blur(4px)';
- } else {
- this._outputCanvasCtx.filter = 'blur(8px)';
- }
+ this._outputCanvasCtx.filter = backgroundType === VIRTUAL_BACKGROUND_TYPE.IMAGE ? 'blur(4px)' : 'blur(8px)';
if (backgroundType === VIRTUAL_BACKGROUND_TYPE.DESKTOP_SHARE) {
// Save current context before applying transformations.
this._outputCanvasCtx.save();
diff --git a/react/features/virtual-background/components/VirtualBackgroundDialog.js b/react/features/virtual-background/components/VirtualBackgroundDialog.js
index bcfe9031ad..8fecdce210 100644
--- a/react/features/virtual-background/components/VirtualBackgroundDialog.js
+++ b/react/features/virtual-background/components/VirtualBackgroundDialog.js
@@ -198,6 +198,8 @@ function VirtualBackground({
blurValue: 25,
selectedThumbnail: 'blur'
});
+ logger.info('"Blur" option setted for virtual background preview!');
+
}, []);
const enableBlurKeyPress = useCallback(e => {
@@ -214,6 +216,8 @@ function VirtualBackground({
blurValue: 8,
selectedThumbnail: 'slight-blur'
});
+ logger.info('"Slight-blur" option setted for virtual background preview!');
+
}, []);
const enableSlideBlurKeyPress = useCallback(e => {
@@ -273,6 +277,7 @@ function VirtualBackground({
dispatch(openDialog(VirtualBackgroundDialog, { initialOptions: newOptions }));
} else {
setOptions(newOptions);
+ logger.info('"Desktop-share" option setted for virtual background preview!');
}
}, [ dispatch, options ]);
@@ -288,6 +293,8 @@ function VirtualBackground({
enabled: false,
selectedThumbnail: 'none'
});
+ logger.info('"None" option setted for virtual background preview!');
+
}, []);
const removeBackgroundKeyPress = useCallback(e => {
@@ -308,6 +315,7 @@ function VirtualBackground({
url: image.src,
selectedThumbnail: image.id
});
+ logger.info('Uploaded image setted for virtual background preview!');
}
}, [ storedImages ]);
@@ -324,6 +332,8 @@ function VirtualBackground({
url,
selectedThumbnail: image.id
});
+ logger.info('Image setted for virtual background preview!');
+
setLoading(false);
}
}, []);
@@ -351,6 +361,8 @@ function VirtualBackground({
selectedThumbnail: uuId
});
};
+ logger.info('New virtual background image uploaded!');
+
reader.onerror = () => {
setLoading(false);
logger.error('Failed to upload virtual image!');
@@ -397,6 +409,8 @@ function VirtualBackground({
}));
}
dispatch(hideDialog());
+ logger.info(`Virtual background type: '${typeof options.backgroundType === 'undefined'
+ ? 'none' : options.backgroundType}' applied!`);
}, [ dispatch, options, _localFlipX ]);
// Prevent the selection of a new virtual background if it has not been applied by default