external-api: add muteEveryone command
This commit is contained in:
parent
c08638da51
commit
2e2d40c1d0
|
@ -16,7 +16,7 @@ import { invite } from '../../react/features/invite';
|
||||||
import { toggleTileView } from '../../react/features/video-layout';
|
import { toggleTileView } from '../../react/features/video-layout';
|
||||||
import { setVideoQuality } from '../../react/features/video-quality';
|
import { setVideoQuality } from '../../react/features/video-quality';
|
||||||
import { getJitsiMeetTransport } from '../transport';
|
import { getJitsiMeetTransport } from '../transport';
|
||||||
|
import { muteAllParticipants } from '../../react/features/remote-video-menu/actions';
|
||||||
import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
|
import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
|
||||||
import {
|
import {
|
||||||
processExternalDeviceRequest
|
processExternalDeviceRequest
|
||||||
|
@ -71,6 +71,16 @@ function initCommands() {
|
||||||
sendAnalytics(createApiEvent('display.name.changed'));
|
sendAnalytics(createApiEvent('display.name.changed'));
|
||||||
APP.conference.changeLocalDisplayName(displayName);
|
APP.conference.changeLocalDisplayName(displayName);
|
||||||
},
|
},
|
||||||
|
'mute-everyone': () => {
|
||||||
|
sendAnalytics(createApiEvent('muted-everyone'));
|
||||||
|
const participants = APP.store.getState()['features/base/participants'];
|
||||||
|
const localIds = participants
|
||||||
|
.filter(participant => participant.local)
|
||||||
|
.filter(participant => participant.role === 'moderator')
|
||||||
|
.map(participant => participant.id);
|
||||||
|
|
||||||
|
APP.store.dispatch(muteAllParticipants(localIds));
|
||||||
|
},
|
||||||
'password': password => {
|
'password': password => {
|
||||||
const { conference, passwordRequired }
|
const { conference, passwordRequired }
|
||||||
= APP.store.getState()['features/base/conference'];
|
= APP.store.getState()['features/base/conference'];
|
||||||
|
|
|
@ -32,6 +32,7 @@ const commands = {
|
||||||
e2eeKey: 'e2ee-key',
|
e2eeKey: 'e2ee-key',
|
||||||
email: 'email',
|
email: 'email',
|
||||||
hangup: 'video-hangup',
|
hangup: 'video-hangup',
|
||||||
|
muteEveryone: 'mute-everyone',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
sendEndpointTextMessage: 'send-endpoint-text-message',
|
sendEndpointTextMessage: 'send-endpoint-text-message',
|
||||||
sendTones: 'send-tones',
|
sendTones: 'send-tones',
|
||||||
|
|
Loading…
Reference in New Issue