|
@@ -2,7 +2,6 @@
|
2
|
2
|
|
3
|
3
|
import React, { useCallback, useEffect, useState } from 'react';
|
4
|
4
|
|
5
|
|
-import { isSupported } from '../../../av-moderation/functions';
|
6
|
5
|
import { translate } from '../../../base/i18n';
|
7
|
6
|
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
|
8
|
7
|
import { MEDIA_TYPE } from '../../../base/media';
|
|
@@ -10,7 +9,6 @@ import {
|
10
|
9
|
getLocalParticipant,
|
11
|
10
|
getParticipantByIdOrUndefined,
|
12
|
11
|
getParticipantDisplayName,
|
13
|
|
- isLocalParticipantModerator,
|
14
|
12
|
isParticipantModerator
|
15
|
13
|
} from '../../../base/participants';
|
16
|
14
|
import { connect } from '../../../base/redux';
|
|
@@ -20,7 +18,7 @@ import {
|
20
|
18
|
isParticipantAudioMuted,
|
21
|
19
|
isParticipantVideoMuted
|
22
|
20
|
} from '../../../base/tracks';
|
23
|
|
-import { ACTION_TRIGGER, type MediaState, MEDIA_STATE, QUICK_ACTION_BUTTON } from '../../constants';
|
|
21
|
+import { ACTION_TRIGGER, type MediaState, MEDIA_STATE } from '../../constants';
|
24
|
22
|
import {
|
25
|
23
|
getParticipantAudioMediaState,
|
26
|
24
|
getParticipantVideoMediaState,
|
|
@@ -174,9 +172,7 @@ function MeetingParticipantItem({
|
174
|
172
|
_audioTrack,
|
175
|
173
|
_disableModeratorIndicator,
|
176
|
174
|
_displayName,
|
177
|
|
- _isModerationSupported,
|
178
|
175
|
_local,
|
179
|
|
- _localModerator,
|
180
|
176
|
_localVideoOwner,
|
181
|
177
|
_participant,
|
182
|
178
|
_participantID,
|
|
@@ -234,12 +230,6 @@ function MeetingParticipantItem({
|
234
|
230
|
askToUnmuteText = t('participantsPane.actions.allowVideo');
|
235
|
231
|
}
|
236
|
232
|
|
237
|
|
- const buttonType = _isModerationSupported
|
238
|
|
- ? _localModerator && _audioMediaState !== MEDIA_STATE.UNMUTED
|
239
|
|
- ? QUICK_ACTION_BUTTON.ASK_TO_UNMUTE
|
240
|
|
- : _quickActionButtonType
|
241
|
|
- : '';
|
242
|
|
-
|
243
|
233
|
return (
|
244
|
234
|
<ParticipantItem
|
245
|
235
|
actionsTrigger = { ACTION_TRIGGER.HOVER }
|
|
@@ -261,7 +251,7 @@ function MeetingParticipantItem({
|
261
|
251
|
&& <>
|
262
|
252
|
<ParticipantQuickAction
|
263
|
253
|
askUnmuteText = { askToUnmuteText }
|
264
|
|
- buttonType = { buttonType }
|
|
254
|
+ buttonType = { _quickActionButtonType }
|
265
|
255
|
muteAudio = { muteAudio }
|
266
|
256
|
muteParticipantButtonText = { muteParticipantButtonText }
|
267
|
257
|
participantID = { _participantID } />
|
|
@@ -307,16 +297,12 @@ function _mapStateToProps(state, ownProps): Object {
|
307
|
297
|
|
308
|
298
|
const { disableModeratorIndicator } = state['features/base/config'];
|
309
|
299
|
|
310
|
|
- const _localModerator = isLocalParticipantModerator(state);
|
311
|
|
-
|
312
|
300
|
return {
|
313
|
301
|
_audioMediaState,
|
314
|
302
|
_audioTrack,
|
315
|
303
|
_disableModeratorIndicator: disableModeratorIndicator,
|
316
|
304
|
_displayName: getParticipantDisplayName(state, participant?.id),
|
317
|
|
- _isModerationSupported: isSupported()(state),
|
318
|
305
|
_local: Boolean(participant?.local),
|
319
|
|
- _localModerator,
|
320
|
306
|
_localVideoOwner: Boolean(ownerId === localParticipantId),
|
321
|
307
|
_participant: participant,
|
322
|
308
|
_participantID: participant?.id,
|