mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Update video thumbnail design Update design of indicators In filmstrip view move Screen Sharing indicator to the top Removed dominant speaker indicator Use ContextMenu component for the connection stats popover Combine Remove video menu and Meeting participant context menu into one component Moved some styles from SCSS to JSS Fix mobile avatars too big Fix mobile horizontal scroll Created button for Send to breakout room action
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
// @flow
|
|
|
|
import React, { useCallback } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useDispatch } from 'react-redux';
|
|
|
|
import { approveParticipant } from '../../../av-moderation/actions';
|
|
import ContextMenuItem from '../../../base/components/context-menu/ContextMenuItem';
|
|
import { IconMicrophoneEmpty } from '../../../base/icons';
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* Whether or not the participant is audio force muted.
|
|
*/
|
|
isAudioForceMuted: boolean,
|
|
|
|
/**
|
|
* Whether or not the participant is video force muted.
|
|
*/
|
|
isVideoForceMuted: boolean,
|
|
|
|
/**
|
|
* The ID for the participant on which the button will act.
|
|
*/
|
|
participantID: string
|
|
}
|
|
|
|
const AskToUnmuteButton = ({ isAudioForceMuted, isVideoForceMuted, participantID }: Props) => {
|
|
const dispatch = useDispatch();
|
|
const { t } = useTranslation();
|
|
const _onClick = useCallback(() => {
|
|
dispatch(approveParticipant(participantID));
|
|
}, [ participantID ]);
|
|
|
|
const text = isAudioForceMuted || !isVideoForceMuted
|
|
? t('participantsPane.actions.askUnmute')
|
|
: t('participantsPane.actions.allowVideo');
|
|
|
|
return (
|
|
<ContextMenuItem
|
|
accessibilityLabel = { text }
|
|
icon = { IconMicrophoneEmpty }
|
|
onClick = { _onClick }
|
|
text = { text } />
|
|
);
|
|
};
|
|
|
|
export default AskToUnmuteButton;
|