Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(participants): Offer audio,video choice to allow a participant.
damencho2ce2e01803ca
diff --git a/lang/main.json b/lang/main.jsonindex 201cc9cfc6..35ca29358f 100644--- a/lang/main.json+++ b/lang/main.json@@ -733,7 +733,9 @@"me": "me","notify": {"OldElectronAPPTitle": "Security vulnerability!",- "allowAction": "Allow",+ "allowAudio": "Allow Audio",+ "allowBoth": "Both",+ "allowVideo": "Allow Video","allowedUnmute": "You can unmute your microphone, start your camera or share your screen.","audioUnmuteBlockedDescription": "Mic unmute operation has been temporarily blocked because of system limits.","audioUnmuteBlockedTitle": "Mic unmute blocked!",@@ -807,7 +809,7 @@"passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removed by another participant","passwordSetRemotely": "$t(lockRoomPasswordUppercase) set by another participant","raiseHandAction": "Raise hand",- "raisedHand": "Would like to speak.",+ "raisedHand": "Would like to participate.","raisedHands": "{{participantName}} and {{raisedHands}} more people","reactionSounds": "Disable sounds","reactionSoundsForAll": "Disable sounds for all",diff --git a/react/features/base/participants/middleware.ts b/react/features/base/participants/middleware.tsindex 5e312e3767..6910ed15e8 100644--- a/react/features/base/participants/middleware.ts+++ b/react/features/base/participants/middleware.ts@@ -3,12 +3,12 @@ import { batch } from 'react-redux';import { AnyAction } from 'redux';import { IStore } from '../../app/types';-import { approveParticipant } from '../../av-moderation/actions';+import { approveParticipant, approveParticipantAudio, approveParticipantVideo } from '../../av-moderation/actions';import { UPDATE_BREAKOUT_ROOMS } from '../../breakout-rooms/actionTypes';import { getBreakoutRooms } from '../../breakout-rooms/functions';import { toggleE2EE } from '../../e2ee/actions';import { MAX_MODE } from '../../e2ee/constants';-import { showNotification } from '../../notifications/actions';+import { hideNotification, showNotification } from '../../notifications/actions';import {LOCAL_RECORDING_NOTIFICATION_ID,NOTIFICATION_TIMEOUT_TYPE,@@ -782,20 +782,43 @@ function _raiseHandUpdated({ dispatch, getState }: IStore, conference: IJitsiConconst isModerator = isLocalParticipantModerator(state);const participant = getParticipantById(state, participantId);- let shouldDisplayAllowAction = false;+ let shouldDisplayAllowAudio = false;+ let shouldDisplayAllowVideo = false;if (isModerator) {- shouldDisplayAllowAction = isForceMuted(participant, MEDIA_TYPE.AUDIO, state)- || isForceMuted(participant, MEDIA_TYPE.VIDEO, state);+ shouldDisplayAllowAudio = isForceMuted(participant, MEDIA_TYPE.AUDIO, state);+ shouldDisplayAllowVideo = isForceMuted(participant, MEDIA_TYPE.VIDEO, state);}let action;- if (shouldDisplayAllowAction) {+ if (shouldDisplayAllowAudio || shouldDisplayAllowVideo) {action = {- customActionNameKey: [ 'notify.allowAction' ],- customActionHandler: [ () => dispatch(approveParticipant(participantId)) ]+ customActionNameKey: [] as string[],+ customActionHandler: [] as Function[]};++ if (shouldDisplayAllowAudio) {+ action.customActionNameKey.push('notify.allowAudio');+ action.customActionHandler.push(() => {+ dispatch(approveParticipantAudio(participantId));+ dispatch(hideNotification(RAISE_HAND_NOTIFICATION_ID));+ });+ }+ if (shouldDisplayAllowVideo) {+ action.customActionNameKey.push('notify.allowVideo');+ action.customActionHandler.push(() => {+ dispatch(approveParticipantVideo(participantId));+ dispatch(hideNotification(RAISE_HAND_NOTIFICATION_ID));+ });+ }+ if (shouldDisplayAllowAudio && shouldDisplayAllowVideo) {+ action.customActionNameKey.push('notify.allowBoth');+ action.customActionHandler.push(() => {+ dispatch(approveParticipant(participantId));+ dispatch(hideNotification(RAISE_HAND_NOTIFICATION_ID));+ });+ }} else {action = {customActionNameKey: [ 'notify.viewParticipants' ],