feat(external-api) Add endConference command
This commit is contained in:
parent
cdb2436b73
commit
17cace070e
|
@ -18,6 +18,7 @@ import {
|
|||
} from '../../react/features/av-moderation/actions';
|
||||
import { isEnabledFromState } from '../../react/features/av-moderation/functions';
|
||||
import {
|
||||
endConference,
|
||||
getCurrentConference,
|
||||
sendTones,
|
||||
setFollowMe,
|
||||
|
@ -777,6 +778,19 @@ function initCommands() {
|
|||
},
|
||||
'toggle-virtual-background': () => {
|
||||
APP.store.dispatch(toggleDialog(VirtualBackgroundDialog));
|
||||
},
|
||||
'end-conference': () => {
|
||||
APP.store.dispatch(endConference());
|
||||
const state = APP.store.getState();
|
||||
const conference = getCurrentConference(state);
|
||||
|
||||
if (!conference) {
|
||||
logger.error('Conference not yet available');
|
||||
} else if (conference.isEndConferenceSupported()) {
|
||||
APP.store.dispatch(endConference());
|
||||
} else {
|
||||
logger.error(' End Conference not supported');
|
||||
}
|
||||
}
|
||||
};
|
||||
transport.on('event', ({ data, name }) => {
|
||||
|
|
|
@ -37,6 +37,7 @@ const commands = {
|
|||
closeBreakoutRoom: 'close-breakout-room',
|
||||
displayName: 'display-name',
|
||||
e2eeKey: 'e2ee-key',
|
||||
endConference: 'end-conference',
|
||||
email: 'email',
|
||||
grantModerator: 'grant-moderator',
|
||||
hangup: 'video-hangup',
|
||||
|
|
Loading…
Reference in New Issue