Merge pull request #19062 from antobinary/toast-on-self-view

refactor: Add a toast warning you that your webcam is still streaming…
This commit is contained in:
Ramón Souza 2023-11-06 08:06:58 -03:00 committed by GitHub
commit 49864dc6e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import BBBMenu from '/imports/ui/components/common/menu/component';
import PropTypes from 'prop-types';
import Styled from './styles';
import Auth from '/imports/ui/services/auth';
import { notify } from '/imports/ui/services/notification';
const intlMessages = defineMessages({
focusLabel: {
@ -56,6 +57,9 @@ const intlMessages = defineMessages({
disableDesc: {
id: 'app.videoDock.webcamDisableDesc',
},
disableWarning: {
id: 'app.videoDock.webcamDisableWarning',
},
});
const UserActions = (props) => {
@ -82,6 +86,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

@ -1167,6 +1167,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",