feat(silent): hide unmute if participant joined without audio (#14803)

* feat(silent): hide unmute if participant joined without audio

* Add additional listener for SILENT_STATUS_CHANGED

* squash: Rename local variable.

* chore(deps) lib-jitsi-meet@latest

https://github.com/jitsi/lib-jitsi-meet/compare/v1839.0.0+ea523fc6...v1840.0.0+fc115be5

---------

Co-authored-by: damencho <damencho@jitsi.org>
This commit is contained in:
Nathan Beck
2024-07-02 09:22:10 -04:00
committed by GitHub
parent 3ae50b6c4c
commit b4a5e63d1d
11 changed files with 75 additions and 15 deletions

View File

@@ -78,6 +78,11 @@ interface IProps {
*/
_isParticipantAvailable?: boolean;
/**
* Whether or not the targeted participant joined without audio.
*/
_isParticipantSilent: boolean;
/**
* Whether the local participant is moderator or not.
*/
@@ -143,6 +148,7 @@ class RemoteVideoMenu extends PureComponent<IProps> {
_disableGrantModerator,
_isBreakoutRoom,
_isParticipantAvailable,
_isParticipantSilent,
_moderator,
_rooms,
_showDemote,
@@ -166,10 +172,10 @@ class RemoteVideoMenu extends PureComponent<IProps> {
<BottomSheet
renderHeader = { this._renderMenuHeader }
showSlidingView = { _isParticipantAvailable }>
<AskUnmuteButton { ...buttonProps } />
{!_isParticipantSilent && <AskUnmuteButton { ...buttonProps } />}
{ !_disableRemoteMute && <MuteButton { ...buttonProps } /> }
<MuteEveryoneElseButton { ...buttonProps } />
{ !_disableRemoteMute && <MuteVideoButton { ...buttonProps } /> }
{ !_disableRemoteMute && !_isParticipantSilent && <MuteVideoButton { ...buttonProps } /> }
{/* @ts-ignore */}
<Divider style = { styles.divider as ViewStyle } />
{ !_disableKick && <KickButton { ...buttonProps } /> }
@@ -242,7 +248,7 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
const kickOutEnabled = getFeatureFlag(state, KICK_OUT_ENABLED, true);
const { participantId } = ownProps;
const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config'];
const isParticipantAvailable = getParticipantById(state, participantId);
const participant = getParticipantById(state, participantId);
const { disableKick, disablePrivateChat } = remoteVideoMenu;
const _rooms = Object.values(getBreakoutRooms(state));
const _currentRoomId = getCurrentRoomId(state);
@@ -257,7 +263,8 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
_disableRemoteMute: Boolean(disableRemoteMute),
_disablePrivateChat: Boolean(disablePrivateChat) || _iAmVisitor,
_isBreakoutRoom,
_isParticipantAvailable: Boolean(isParticipantAvailable),
_isParticipantAvailable: Boolean(participant),
_isParticipantSilent: Boolean(participant?.isSilent),
_moderator: moderator,
_participantDisplayName: getParticipantDisplayName(state, participantId),
_rooms,