refactor: Add a toast warning you that your webcam is still streaming…

This commit is contained in:
Anton Georgiev 2023-11-20 13:04:30 -03:00 committed by André
parent 242f1bd424
commit 97faafa97c
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import * as PluginSdk from 'bigbluebutton-html-plugin-sdk';
import Styled from './styles';
import Auth from '/imports/ui/services/auth';
import { PluginsContext } from '/imports/ui/components/components-data/plugin-context/context';
import { notify } from '/imports/ui/services/notification';
const intlMessages = defineMessages({
focusLabel: {
@ -65,6 +66,9 @@ const intlMessages = defineMessages({
disableDesc: {
id: 'app.videoDock.webcamDisableDesc',
},
disableWarning: {
id: 'app.videoDock.webcamDisableWarning',
},
});
const UserActions = (props) => {
@ -101,6 +105,7 @@ const UserActions = (props) => {
const toggleDisableCam = () => {
if (!isCameraDisabled) {
Session.set('disabledCams', [...disabledCams, cameraId]);
notify(intl.formatMessage(intlMessages.disableWarning), 'info', 'warning');
} else {
Session.set('disabledCams', disabledCams.filter((cId) => cId !== cameraId));
}

View File

@ -1171,6 +1171,7 @@
"app.videoDock.webcamDisableLabelAllCams": "Disable self-view (all cameras)",
"app.videoDock.webcamEnableLabel": "Enable self-view",
"app.videoDock.webcamDisableDesc": "Self-view disabled",
"app.videoDock.webcamDisableWarning": "Your webcam is still visible to others! Only your local view is disabled.",
"app.videoDock.webcamPinLabel": "Pin",
"app.videoDock.webcamPinDesc": "Pin the selected webcam",
"app.videoDock.webcamFullscreenLabel": "Fullscreen webcam",