Skip to content

Commit

Permalink
mirror/unmirror labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonlsouza committed Sep 4, 2023
1 parent 798cb8d commit 1b2aa1e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const VideoListItem = (props) => {
onHandleVideoFocus={onHandleVideoFocus}
focused={focused}
onHandleMirror={() => setIsMirrored((value) => !value)}
isMirrored={isMirrored}
isRTL={isRTL}
isStream={isStream}
onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)}
Expand Down Expand Up @@ -156,6 +157,7 @@ const VideoListItem = (props) => {
onHandleVideoFocus={onHandleVideoFocus}
focused={focused}
onHandleMirror={() => setIsMirrored((value) => !value)}
isMirrored={isMirrored}
isRTL={isRTL}
isStream={isStream}
onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)}
Expand Down Expand Up @@ -206,6 +208,7 @@ const VideoListItem = (props) => {
onHandleVideoFocus={onHandleVideoFocus}
focused={focused}
onHandleMirror={() => setIsMirrored((value) => !value)}
isMirrored={isMirrored}
isRTL={isRTL}
isStream={isStream}
onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ const intlMessages = defineMessages({
unpinDesc: {
id: 'app.videoDock.webcamUnpinDesc',
},
mirrorLabel: {
id: 'app.videoDock.webcamMirrorLabel',
enableMirrorLabel: {
id: 'app.videoDock.webcamEnableMirrorLabel',
},
mirrorDesc: {
id: 'app.videoDock.webcamMirrorDesc',
enableMirrorDesc: {
id: 'app.videoDock.webcamEnableMirrorDesc',
},
disableMirrorLabel: {
id: 'app.videoDock.webcamDisableMirrorLabel',
},
disableMirrorDesc: {
id: 'app.videoDock.webcamDisableMirrorDesc',
},
fullscreenLabel: {
id: 'app.videoDock.webcamFullscreenLabel',
Expand All @@ -61,7 +67,7 @@ const intlMessages = defineMessages({
const UserActions = (props) => {
const {
name, cameraId, numOfStreams, onHandleVideoFocus, user, focused, onHandleMirror,
isVideoSqueezed, videoContainer, isRTL, isStream, isSelfViewDisabled,
isVideoSqueezed, videoContainer, isRTL, isStream, isSelfViewDisabled, isMirrored,
} = props;

const intl = useIntl();
Expand All @@ -73,6 +79,7 @@ const UserActions = (props) => {
const userId = user?.userId;
const isPinnedIntlKey = !pinned ? 'pin' : 'unpin';
const isFocusedIntlKey = !focused ? 'focus' : 'unfocus';
const isMirroredIntlKey = !isMirrored ? 'enableMirror' : 'disableMirror';
const disabledCams = Session.get('disabledCams') || [];
const isCameraDisabled = disabledCams && disabledCams?.includes(cameraId);
const enableSelfCamIntlKey = !isCameraDisabled ? 'disable' : 'enable';
Expand Down Expand Up @@ -120,8 +127,8 @@ const UserActions = (props) => {
if (isStream) {
menuItems.push({
key: `${cameraId}-mirror`,
label: intl.formatMessage(intlMessages.mirrorLabel),
description: intl.formatMessage(intlMessages.mirrorDesc),
label: intl.formatMessage(intlMessages[`${isMirroredIntlKey}Label`]),
description: intl.formatMessage(intlMessages[`${isMirroredIntlKey}Desc`]),
onClick: () => onHandleMirror(cameraId),
dataTest: 'mirrorWebcamBtn',
});
Expand Down
6 changes: 4 additions & 2 deletions bigbluebutton-html5/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,10 @@
"app.feedback.textarea": "How can we make BigBlueButton better?",
"app.feedback.sendFeedback": "Send Feedback",
"app.feedback.sendFeedbackDesc": "Send a feedback and leave the meeting",
"app.videoDock.webcamMirrorLabel": "Mirror",
"app.videoDock.webcamMirrorDesc": "Mirror the selected webcam",
"app.videoDock.webcamEnableMirrorLabel": "Enable webcam mirroring",
"app.videoDock.webcamEnableMirrorDesc": "Mirror the selected webcam",
"app.videoDock.webcamDisableMirrorLabel": "Disable webcam mirroring",
"app.videoDock.webcamDisableMirrorDesc": "Disable mirroring in the selected webcam",
"app.videoDock.webcamFocusLabel": "Focus",
"app.videoDock.webcamFocusDesc": "Focus the selected webcam",
"app.videoDock.webcamUnfocusLabel": "Unfocus",
Expand Down

0 comments on commit 1b2aa1e

Please sign in to comment.