diff --git a/react/features/participants-pane/components/native/ParticipantsPaneButton.js b/react/features/participants-pane/components/native/ParticipantsPaneButton.js index 66442698b..5573193ec 100644 --- a/react/features/participants-pane/components/native/ParticipantsPaneButton.js +++ b/react/features/participants-pane/components/native/ParticipantsPaneButton.js @@ -5,12 +5,8 @@ import type { Dispatch } from 'redux'; import { openDialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; import { IconParticipants } from '../../../base/icons'; -import { setActiveModalId } from '../../../base/modal'; import { connect } from '../../../base/redux'; import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components'; -import { - PARTICIPANTS_PANE_ID -} from '../../../invite/constants'; import { ParticipantsPane } from './'; @@ -39,7 +35,6 @@ class ParticipantsPaneButton extends AbstractButton { */ _handleClick() { this.props.dispatch(openDialog(ParticipantsPane)); - this.props.dispatch(setActiveModalId(PARTICIPANTS_PANE_ID)); } } diff --git a/react/features/participants-pane/components/web/LobbyParticipantList.js b/react/features/participants-pane/components/web/LobbyParticipantList.js index 43ef071fb..bad4365ce 100644 --- a/react/features/participants-pane/components/web/LobbyParticipantList.js +++ b/react/features/participants-pane/components/web/LobbyParticipantList.js @@ -5,9 +5,9 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useSelector, useDispatch } from 'react-redux'; +import { withPixelLineHeight } from '../../../base/styles/functions.web'; +import { admitMultiple } from '../../../lobby/actions.web'; import { getLobbyState } from '../../../lobby/functions'; -import { withPixelLineHeight } from '../../base/styles/functions.web'; -import { admitMultiple } from '../../lobby/actions.web'; import { LobbyParticipantItem } from './LobbyParticipantItem'; diff --git a/react/features/video-menu/actions.any.js b/react/features/video-menu/actions.any.js index c89103243..1bb73c11f 100644 --- a/react/features/video-menu/actions.any.js +++ b/react/features/video-menu/actions.any.js @@ -23,8 +23,8 @@ import { getRemoteParticipants, muteRemoteParticipant } from '../base/participants'; +import { getIsParticipantAudioMuted } from '../base/tracks'; import { setKnockingParticipantApproval } from '../lobby/actions'; -import { getLobbyState } from '../lobby/functions'; declare var APP: Object; @@ -112,12 +112,13 @@ export function muteAllParticipants(exclude: Array, mediaType: MEDIA_TYP /** * Admit all knocking participants. * + * @param {Array} knockingParticipants - Array of participants waiting in lobby. + * @param {boolean} lobbyEnabled - Is lobby mode enabled. + * * @returns {Function} */ -export function admitAllKnockingParticipants() { - return (dispatch: Dispatch, getState: Function) => { - const state = getState(); - const { knockingParticipants, lobbyEnabled } = getLobbyState(state); +export function admitAllKnockingParticipants(knockingParticipants: Array, lobbyEnabled: boolean) { + return (dispatch: Dispatch) => { const knockingParticipantsIds = knockingParticipants.map(participant => participant.id); knockingParticipantsIds @@ -125,3 +126,19 @@ export function admitAllKnockingParticipants() { .map(dispatch); }; } + + +/** + * Don't allow participants to unmute. + * + * @returns {Function} + */ +export function dontAllowUnmute() { + return (dispatch: Dispatch, getState: Function) => { + const state = getState(); + const participants = state['features/base/participants']; + + participants + .map(p => !getIsParticipantAudioMuted(p) && setAudioMuted(true)); + }; +}