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(breakout): Hides unsupported services in breakout rooms.

damenchobcc1a3ec72fd
diff --git a/react/features/file-sharing/functions.any.ts b/react/features/file-sharing/functions.any.ts
index 323ee910e2..6b3ac440f8 100644
--- a/react/features/file-sharing/functions.any.ts
+++ b/react/features/file-sharing/functions.any.ts
@@ -8,6 +8,7 @@ import {
} from '../base/icons/svg';
import { MEET_FEATURES } from '../base/jwt/constants';
import { isJwtFeatureEnabled } from '../base/jwt/functions';
+import { isInBreakoutRoom } from '../breakout-rooms/functions';
import { showErrorNotification } from '../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE, NOTIFICATION_TYPE } from '../notifications/constants';
import { iAmVisitor } from '../visitors/functions';
@@ -24,7 +25,7 @@ import { MAX_FILE_SIZE } from './constants';
export function isFileSharingEnabled(state: IReduxState) {
const { fileSharing } = state['features/base/config'] ?? {};
- return Boolean(fileSharing?.enabled && fileSharing?.apiUrl);
+ return Boolean(fileSharing?.enabled && fileSharing?.apiUrl && !isInBreakoutRoom(state));
}
/**
diff --git a/react/features/subtitles/functions.any.ts b/react/features/subtitles/functions.any.ts
index c797ad199b..7bdd019481 100644
--- a/react/features/subtitles/functions.any.ts
+++ b/react/features/subtitles/functions.any.ts
@@ -2,6 +2,7 @@ import { IReduxState } from '../app/types';
import { IStateful } from '../base/app/types';
import { TRANSLATION_LANGUAGES, TRANSLATION_LANGUAGES_HEAD } from '../base/i18n/i18next';
import { toState } from '../base/redux/functions';
+import { isInBreakoutRoom } from '../breakout-rooms/functions';
import { canAddTranscriber, isTranscribing } from '../transcribing/functions';
/**
@@ -67,5 +68,5 @@ export function areClosedCaptionsEnabled(state: IReduxState) {
export function isCCTabEnabled(state: IReduxState) {
const { showSubtitlesOnStage = false } = state['features/base/settings'];
- return areClosedCaptionsEnabled(state) && !showSubtitlesOnStage;
+ return areClosedCaptionsEnabled(state) && !showSubtitlesOnStage && !isInBreakoutRoom(state);
}
diff --git a/react/features/subtitles/hooks.web.ts b/react/features/subtitles/hooks.web.ts
index a9265d9bbc..1fcce49656 100644
--- a/react/features/subtitles/hooks.web.ts
+++ b/react/features/subtitles/hooks.web.ts
@@ -1,6 +1,7 @@
import { useSelector } from 'react-redux';
import { IReduxState } from '../app/types';
+import { isInBreakoutRoom } from '../breakout-rooms/functions';
import ClosedCaptionButton from './components/web/ClosedCaptionButton';
import { areClosedCaptionsEnabled, canStartSubtitles } from './functions.any';
@@ -20,8 +21,9 @@ export function useClosedCaptionButton() {
const isStartSubtitlesButtonVisible = useSelector(canStartSubtitles);
const { showSubtitlesOnStage = false } = useSelector((state: IReduxState) => state['features/base/settings']);
const _areClosedCaptionsEnabled = useSelector(areClosedCaptionsEnabled);
+ const _isInBreakoutRoom = useSelector((state: IReduxState) => isInBreakoutRoom(state));
- if (!_areClosedCaptionsEnabled) {
+ if (!_areClosedCaptionsEnabled || _isInBreakoutRoom) {
return undefined;
}
diff --git a/react/features/toolbox/hooks.web.ts b/react/features/toolbox/hooks.web.ts
index c36fe18164..b780dbcf28 100644
--- a/react/features/toolbox/hooks.web.ts
+++ b/react/features/toolbox/hooks.web.ts
@@ -12,6 +12,7 @@ import JitsiMeetJS from '../base/lib-jitsi-meet';
import { raiseHand } from '../base/participants/actions';
import { getLocalParticipant, hasRaisedHand } from '../base/participants/functions';
import { isToggleCameraEnabled } from '../base/tracks/functions.web';
+import { isInBreakoutRoom } from '../breakout-rooms/functions';
import { toggleChat } from '../chat/actions.web';
import { isChatDisabled } from '../chat/functions';
import { useChatButton } from '../chat/hooks.web';
@@ -260,6 +261,19 @@ function useHelpButton() {
}
}
+/**
+ * Hide invite button for breakout-rooms.
+ *
+ * @returns {Object | undefined}
+ */
+function useInviteButton() {
+ const visible = useSelector((state: IReduxState) => !isInBreakoutRoom(state));
+
+ if (visible) {
+ return invite;
+ }
+}
+
/**
* Returns all buttons that could be rendered.
*
@@ -293,6 +307,7 @@ export function useToolboxButtons(
const feedback = useFeedbackButton();
const _download = useDownloadButton();
const _help = useHelpButton();
+ const _invite = useInviteButton();
const customPanel = useCustomPanelButton();
const buttons: { [key in ToolbarButton]?: IToolboxButton; } = {
@@ -304,7 +319,7 @@ export function useToolboxButtons(
raisehand,
reactions,
'participants-pane': participants,
- invite,
+ invite: _invite,
tileview,
'toggle-camera': toggleCameraButton,
videoquality: videoQuality,