Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(external-api) Add endConference command

Shawn17cace070e75
diff --git a/modules/API/API.js b/modules/API/API.js
index 2bcd55afc7..2330faae2b 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -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 }) => {
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 40bda25a25..d8b290245c 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -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',