|
@@ -43,6 +43,15 @@ import {
|
43
|
43
|
} from '../../react/features/base/participants';
|
44
|
44
|
import { updateSettings } from '../../react/features/base/settings';
|
45
|
45
|
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
|
|
46
|
+import {
|
|
47
|
+ autoAssignToBreakoutRooms,
|
|
48
|
+ closeBreakoutRoom,
|
|
49
|
+ createBreakoutRoom,
|
|
50
|
+ moveToRoom,
|
|
51
|
+ removeBreakoutRoom,
|
|
52
|
+ sendParticipantToRoom
|
|
53
|
+} from '../../react/features/breakout-rooms/actions';
|
|
54
|
+import { getBreakoutRooms } from '../../react/features/breakout-rooms/functions';
|
46
|
55
|
import {
|
47
|
56
|
sendMessage,
|
48
|
57
|
setPrivateMessageRecipient,
|
|
@@ -118,6 +127,14 @@ let videoAvailable = true;
|
118
|
127
|
*/
|
119
|
128
|
function initCommands() {
|
120
|
129
|
commands = {
|
|
130
|
+ 'add-breakout-room': name => {
|
|
131
|
+ if (!isLocalParticipantModerator(APP.store.getState())) {
|
|
132
|
+ logger.error('Missing moderator rights to add breakout rooms');
|
|
133
|
+
|
|
134
|
+ return;
|
|
135
|
+ }
|
|
136
|
+ APP.store.dispatch(createBreakoutRoom(name));
|
|
137
|
+ },
|
121
|
138
|
'answer-knocking-participant': (id, approved) => {
|
122
|
139
|
APP.store.dispatch(setKnockingParticipantApproval(id, approved));
|
123
|
140
|
},
|
|
@@ -135,6 +152,14 @@ function initCommands() {
|
135
|
152
|
|
136
|
153
|
APP.store.dispatch(approveParticipantAudio(participantId));
|
137
|
154
|
},
|
|
155
|
+ 'auto-assign-to-breakout-rooms': () => {
|
|
156
|
+ if (!isLocalParticipantModerator(APP.store.getState())) {
|
|
157
|
+ logger.error('Missing moderator rights to auto-assign participants to breakout rooms');
|
|
158
|
+
|
|
159
|
+ return;
|
|
160
|
+ }
|
|
161
|
+ APP.store.dispatch(autoAssignToBreakoutRooms());
|
|
162
|
+ },
|
138
|
163
|
'display-name': displayName => {
|
139
|
164
|
sendAnalytics(createApiEvent('display.name.changed'));
|
140
|
165
|
APP.conference.changeLocalDisplayName(displayName);
|
|
@@ -198,6 +223,14 @@ function initCommands() {
|
198
|
223
|
|
199
|
224
|
APP.store.dispatch(reject(participantId));
|
200
|
225
|
},
|
|
226
|
+ 'remove-breakout-room': breakoutRoomJid => {
|
|
227
|
+ if (!isLocalParticipantModerator(APP.store.getState())) {
|
|
228
|
+ logger.error('Missing moderator rights to remove breakout rooms');
|
|
229
|
+
|
|
230
|
+ return;
|
|
231
|
+ }
|
|
232
|
+ APP.store.dispatch(removeBreakoutRoom(breakoutRoomJid));
|
|
233
|
+ },
|
201
|
234
|
'resize-large-video': (width, height) => {
|
202
|
235
|
logger.debug('Resize large video command received');
|
203
|
236
|
sendAnalytics(createApiEvent('largevideo.resized'));
|
|
@@ -537,6 +570,26 @@ function initCommands() {
|
537
|
570
|
'cancel-private-chat': () => {
|
538
|
571
|
APP.store.dispatch(setPrivateMessageRecipient());
|
539
|
572
|
},
|
|
573
|
+ 'close-breakout-room': roomId => {
|
|
574
|
+ if (!isLocalParticipantModerator(APP.store.getState())) {
|
|
575
|
+ logger.error('Missing moderator rights to close breakout rooms');
|
|
576
|
+
|
|
577
|
+ return;
|
|
578
|
+ }
|
|
579
|
+ APP.store.dispatch(closeBreakoutRoom(roomId));
|
|
580
|
+ },
|
|
581
|
+ 'join-breakout-room': roomId => {
|
|
582
|
+ APP.store.dispatch(moveToRoom(roomId));
|
|
583
|
+ },
|
|
584
|
+ 'send-participant-to-room': (participantId, roomId) => {
|
|
585
|
+ if (!isLocalParticipantModerator(APP.store.getState())) {
|
|
586
|
+ logger.error('Missing moderator rights to send participants to rooms');
|
|
587
|
+
|
|
588
|
+ return;
|
|
589
|
+ }
|
|
590
|
+
|
|
591
|
+ APP.store.dispatch(sendParticipantToRoom(participantId, roomId));
|
|
592
|
+ },
|
540
|
593
|
'kick-participant': participantId => {
|
541
|
594
|
APP.store.dispatch(kickParticipant(participantId));
|
542
|
595
|
},
|
|
@@ -681,6 +734,10 @@ function initCommands() {
|
681
|
734
|
});
|
682
|
735
|
break;
|
683
|
736
|
}
|
|
737
|
+ case 'list-breakout-rooms': {
|
|
738
|
+ callback(getBreakoutRooms(APP.store.getState()));
|
|
739
|
+ break;
|
|
740
|
+ }
|
684
|
741
|
default:
|
685
|
742
|
return false;
|
686
|
743
|
}
|