Be able to toggle the raise-hand via external-api (#8838)
* Be able to toggle the raise-hand via external_api * Code Review inputs
This commit is contained in:
parent
678f3e232b
commit
6175a5cad5
|
@ -16,7 +16,13 @@ import { overwriteConfig, getWhitelistedJSON } from '../../react/features/base/c
|
|||
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
|
||||
import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
|
||||
import { MEDIA_TYPE } from '../../react/features/base/media';
|
||||
import { pinParticipant, getParticipantById, kickParticipant } from '../../react/features/base/participants';
|
||||
import {
|
||||
getLocalParticipant,
|
||||
getParticipantById,
|
||||
participantUpdated,
|
||||
pinParticipant,
|
||||
kickParticipant
|
||||
} from '../../react/features/base/participants';
|
||||
import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
|
||||
import { openChat } from '../../react/features/chat/actions.web';
|
||||
import {
|
||||
|
@ -167,6 +173,23 @@ function initCommands() {
|
|||
sendAnalytics(createApiEvent('chat.toggled'));
|
||||
APP.UI.toggleChat();
|
||||
},
|
||||
'toggle-raise-hand': () => {
|
||||
const localParticipant = getLocalParticipant(APP.store.getState());
|
||||
|
||||
if (!localParticipant) {
|
||||
return;
|
||||
}
|
||||
const { raisedHand } = localParticipant;
|
||||
|
||||
sendAnalytics(createApiEvent('raise-hand.toggled'));
|
||||
APP.store.dispatch(
|
||||
participantUpdated({
|
||||
id: APP.conference.getMyUserId(),
|
||||
local: true,
|
||||
raisedHand: !raisedHand
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback to invoke when the "toggle-share-screen" command is received.
|
||||
|
|
|
@ -52,6 +52,7 @@ const commands = {
|
|||
toggleAudio: 'toggle-audio',
|
||||
toggleChat: 'toggle-chat',
|
||||
toggleFilmStrip: 'toggle-film-strip',
|
||||
toggleRaiseHand: 'toggle-raise-hand',
|
||||
toggleShareScreen: 'toggle-share-screen',
|
||||
toggleTileView: 'toggle-tile-view',
|
||||
toggleVideo: 'toggle-video'
|
||||
|
|
Loading…
Reference in New Issue