fix(breakout-rooms) Hide non-working options inside breakout rooms (#10959)
When the local participant is a moderator and is in a breakout room hide the following: - advanced moderation - Ask to Unmute - Grant Moderator
This commit is contained in:
parent
4340d5b7fc
commit
d655acdc30
|
@ -27,6 +27,7 @@ import {
|
||||||
getParticipantCount,
|
getParticipantCount,
|
||||||
isEveryoneModerator
|
isEveryoneModerator
|
||||||
} from '../../../base/participants';
|
} from '../../../base/participants';
|
||||||
|
import { isInBreakoutRoom } from '../../../breakout-rooms/functions';
|
||||||
import {
|
import {
|
||||||
SETTINGS_TABS,
|
SETTINGS_TABS,
|
||||||
openSettingsDialog,
|
openSettingsDialog,
|
||||||
|
@ -89,6 +90,7 @@ export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: Props
|
||||||
const participantCount = useSelector(getParticipantCount);
|
const participantCount = useSelector(getParticipantCount);
|
||||||
const isAudioModerationEnabled = useSelector(isAvModerationEnabled(MEDIA_TYPE.AUDIO));
|
const isAudioModerationEnabled = useSelector(isAvModerationEnabled(MEDIA_TYPE.AUDIO));
|
||||||
const isVideoModerationEnabled = useSelector(isAvModerationEnabled(MEDIA_TYPE.VIDEO));
|
const isVideoModerationEnabled = useSelector(isAvModerationEnabled(MEDIA_TYPE.VIDEO));
|
||||||
|
const isBreakoutRoom = useSelector(isInBreakoutRoom);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
@ -144,7 +146,7 @@ export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: Props
|
||||||
onClick: muteAllVideo,
|
onClick: muteAllVideo,
|
||||||
text: t('participantsPane.actions.stopEveryonesVideo')
|
text: t('participantsPane.actions.stopEveryonesVideo')
|
||||||
} ] } />
|
} ] } />
|
||||||
{isModerationSupported && (participantCount === 1 || !allModerators) && (
|
{!isBreakoutRoom && isModerationSupported && (participantCount === 1 || !allModerators) && (
|
||||||
<ContextMenuItemGroup actions = { actions }>
|
<ContextMenuItemGroup actions = { actions }>
|
||||||
<div className = { classes.text }>
|
<div className = { classes.text }>
|
||||||
<span>{t('participantsPane.actions.allow')}</span>
|
<span>{t('participantsPane.actions.allow')}</span>
|
||||||
|
|
|
@ -116,6 +116,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
isHighlighted: boolean,
|
isHighlighted: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the local participant is in a breakout room.
|
||||||
|
*/
|
||||||
|
isInBreakoutRoom: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback used to open a confirmation dialog for audio muting.
|
* Callback used to open a confirmation dialog for audio muting.
|
||||||
*/
|
*/
|
||||||
|
@ -189,6 +194,7 @@ function MeetingParticipantItem({
|
||||||
_videoMediaState,
|
_videoMediaState,
|
||||||
askUnmuteText,
|
askUnmuteText,
|
||||||
isHighlighted,
|
isHighlighted,
|
||||||
|
isInBreakoutRoom,
|
||||||
muteAudio,
|
muteAudio,
|
||||||
muteParticipantButtonText,
|
muteParticipantButtonText,
|
||||||
onContextMenu,
|
onContextMenu,
|
||||||
|
@ -261,13 +267,15 @@ function MeetingParticipantItem({
|
||||||
|
|
||||||
{!overflowDrawer && !_participant?.isFakeParticipant
|
{!overflowDrawer && !_participant?.isFakeParticipant
|
||||||
&& <>
|
&& <>
|
||||||
<ParticipantQuickAction
|
{!isInBreakoutRoom && (
|
||||||
askUnmuteText = { askToUnmuteText }
|
<ParticipantQuickAction
|
||||||
buttonType = { _quickActionButtonType }
|
askUnmuteText = { askToUnmuteText }
|
||||||
muteAudio = { muteAudio }
|
buttonType = { _quickActionButtonType }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
muteAudio = { muteAudio }
|
||||||
participantID = { _participantID }
|
muteParticipantButtonText = { muteParticipantButtonText }
|
||||||
participantName = { _displayName } />
|
participantID = { _participantID }
|
||||||
|
participantName = { _displayName } />
|
||||||
|
)}
|
||||||
<ParticipantActionEllipsis
|
<ParticipantActionEllipsis
|
||||||
accessibilityLabel = { participantActionEllipsisLabel }
|
accessibilityLabel = { participantActionEllipsisLabel }
|
||||||
onClick = { onContextMenu } />
|
onClick = { onContextMenu } />
|
||||||
|
|
|
@ -11,6 +11,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
askUnmuteText: string,
|
askUnmuteText: string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the local participant is in a breakout room.
|
||||||
|
*/
|
||||||
|
isInBreakoutRoom: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for the mouse leaving this item.
|
* Callback for the mouse leaving this item.
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +39,7 @@ type Props = {
|
||||||
/**
|
/**
|
||||||
* The meeting participants.
|
* The meeting participants.
|
||||||
*/
|
*/
|
||||||
participantIds: Array<string>,
|
participantIds: Array<string>,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback used to open an actions drawer for a participant.
|
* Callback used to open an actions drawer for a participant.
|
||||||
|
@ -74,6 +79,7 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
function MeetingParticipantItems({
|
function MeetingParticipantItems({
|
||||||
askUnmuteText,
|
askUnmuteText,
|
||||||
|
isInBreakoutRoom,
|
||||||
lowerMenu,
|
lowerMenu,
|
||||||
toggleMenu,
|
toggleMenu,
|
||||||
muteAudio,
|
muteAudio,
|
||||||
|
@ -90,6 +96,7 @@ function MeetingParticipantItems({
|
||||||
<MeetingParticipantItem
|
<MeetingParticipantItem
|
||||||
askUnmuteText = { askUnmuteText }
|
askUnmuteText = { askUnmuteText }
|
||||||
isHighlighted = { raiseContextId === id }
|
isHighlighted = { raiseContextId === id }
|
||||||
|
isInBreakoutRoom = { isInBreakoutRoom }
|
||||||
key = { id }
|
key = { id }
|
||||||
muteAudio = { muteAudio }
|
muteAudio = { muteAudio }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
muteParticipantButtonText = { muteParticipantButtonText }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { makeStyles } from '@material-ui/styles';
|
import { makeStyles } from '@material-ui/styles';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
|
||||||
import { rejectParticipantAudio } from '../../../av-moderation/actions';
|
import { rejectParticipantAudio } from '../../../av-moderation/actions';
|
||||||
import useContextMenu from '../../../base/components/context-menu/useContextMenu';
|
import useContextMenu from '../../../base/components/context-menu/useContextMenu';
|
||||||
|
@ -15,7 +15,7 @@ import {
|
||||||
} from '../../../base/participants';
|
} from '../../../base/participants';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { normalizeAccents } from '../../../base/util/strings';
|
import { normalizeAccents } from '../../../base/util/strings';
|
||||||
import { getBreakoutRooms, getCurrentRoomId } from '../../../breakout-rooms/functions';
|
import { getBreakoutRooms, getCurrentRoomId, isInBreakoutRoom } from '../../../breakout-rooms/functions';
|
||||||
import { showOverflowDrawer } from '../../../toolbox/functions';
|
import { showOverflowDrawer } from '../../../toolbox/functions';
|
||||||
import { muteRemote } from '../../../video-menu/actions.any';
|
import { muteRemote } from '../../../video-menu/actions.any';
|
||||||
import { getSortedParticipantIds, shouldRenderInviteButton } from '../../functions';
|
import { getSortedParticipantIds, shouldRenderInviteButton } from '../../functions';
|
||||||
|
@ -92,6 +92,7 @@ function MeetingParticipants({
|
||||||
const youText = t('chat.you');
|
const youText = t('chat.you');
|
||||||
const askUnmuteText = t('participantsPane.actions.askUnmute');
|
const askUnmuteText = t('participantsPane.actions.askUnmute');
|
||||||
const muteParticipantButtonText = t('dialog.muteParticipantButton');
|
const muteParticipantButtonText = t('dialog.muteParticipantButton');
|
||||||
|
const isBreakoutRoom = useSelector(isInBreakoutRoom);
|
||||||
|
|
||||||
const styles = useStyles();
|
const styles = useStyles();
|
||||||
|
|
||||||
|
@ -112,6 +113,7 @@ function MeetingParticipants({
|
||||||
<div>
|
<div>
|
||||||
<MeetingParticipantItems
|
<MeetingParticipantItems
|
||||||
askUnmuteText = { askUnmuteText }
|
askUnmuteText = { askUnmuteText }
|
||||||
|
isInBreakoutRoom = { isBreakoutRoom }
|
||||||
lowerMenu = { lowerMenu }
|
lowerMenu = { lowerMenu }
|
||||||
muteAudio = { muteAudio }
|
muteAudio = { muteAudio }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
muteParticipantButtonText = { muteParticipantButtonText }
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/u
|
||||||
import { IconShareVideo } from '../../../base/icons';
|
import { IconShareVideo } from '../../../base/icons';
|
||||||
import { MEDIA_TYPE } from '../../../base/media';
|
import { MEDIA_TYPE } from '../../../base/media';
|
||||||
import { getLocalParticipant, PARTICIPANT_ROLE } from '../../../base/participants';
|
import { getLocalParticipant, PARTICIPANT_ROLE } from '../../../base/participants';
|
||||||
import { getBreakoutRooms, getCurrentRoomId } from '../../../breakout-rooms/functions';
|
import { getBreakoutRooms, getCurrentRoomId, isInBreakoutRoom } from '../../../breakout-rooms/functions';
|
||||||
import { setVolume } from '../../../filmstrip/actions.web';
|
import { setVolume } from '../../../filmstrip/actions.web';
|
||||||
import { isForceMuted } from '../../../participants-pane/functions';
|
import { isForceMuted } from '../../../participants-pane/functions';
|
||||||
import { requestRemoteControl, stopController } from '../../../remote-control';
|
import { requestRemoteControl, stopController } from '../../../remote-control';
|
||||||
|
@ -139,6 +139,7 @@ const ParticipantContextMenu = ({
|
||||||
const { participantsVolume } = useSelector(state => state['features/filmstrip']);
|
const { participantsVolume } = useSelector(state => state['features/filmstrip']);
|
||||||
const _volume = (participant?.local ?? true ? undefined
|
const _volume = (participant?.local ?? true ? undefined
|
||||||
: participant?.id ? participantsVolume[participant?.id] : undefined) || 1;
|
: participant?.id ? participantsVolume[participant?.id] : undefined) || 1;
|
||||||
|
const isBreakoutRoom = useSelector(isInBreakoutRoom);
|
||||||
|
|
||||||
const _currentRoomId = useSelector(getCurrentRoomId);
|
const _currentRoomId = useSelector(getCurrentRoomId);
|
||||||
const _rooms = Object.values(useSelector(getBreakoutRooms));
|
const _rooms = Object.values(useSelector(getBreakoutRooms));
|
||||||
|
@ -209,7 +210,7 @@ const ParticipantContextMenu = ({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!disableGrantModerator) {
|
if (!disableGrantModerator && !isBreakoutRoom) {
|
||||||
buttons2.push(
|
buttons2.push(
|
||||||
<GrantModeratorButton
|
<GrantModeratorButton
|
||||||
key = 'grant-moderator'
|
key = 'grant-moderator'
|
||||||
|
|
Loading…
Reference in New Issue