From f54ed84edb3080c3d941c6ef1092bc7e49bf0621 Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 13 May 2020 10:42:03 +0200 Subject: [PATCH] Moderator: Mute all screen sharing --- app/src/RoomClient.js | 20 +++++++++++++++++++ app/src/actions/roomActions.js | 6 ++++++ .../ParticipantList/ListModerator.js | 16 +++++++++++++++ .../MeetingDrawer/ParticipantList/ListPeer.js | 2 +- app/src/reducers/room.js | 3 +++ server/lib/Room.js | 13 ++++++++++++ 6 files changed, 59 insertions(+), 1 deletion(-) diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index bb16d82..4883595 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -1502,6 +1502,26 @@ export default class RoomClient roomActions.setStopAllVideoInProgress(false)); } + async stopAllPeerScreenSharing() + { + logger.debug('stopAllPeerScreenSharing()'); + + store.dispatch( + roomActions.setStopAllScreenSharingInProgress(true)); + + try + { + await this.sendRequest('moderator:stopAllScreenSharing'); + } + catch (error) + { + logger.error('stopAllPeerScreenSharing() failed: %o', error); + } + + store.dispatch( + roomActions.setStopAllScreenSharingInProgress(false)); + } + async closeMeeting() { logger.debug('closeMeeting()'); diff --git a/app/src/actions/roomActions.js b/app/src/actions/roomActions.js index 5ae45e3..a73e18a 100644 --- a/app/src/actions/roomActions.js +++ b/app/src/actions/roomActions.js @@ -164,6 +164,12 @@ export const setStopAllVideoInProgress = (flag) => payload : { flag } }); +export const setStopAllScreenSharingInProgress = (flag) => + ({ + type : 'STOP_ALL_SCREEN_SHARING_IN_PROGRESS', + payload : { flag } + }); + export const setCloseMeetingInProgress = (flag) => ({ type : 'CLOSE_MEETING_IN_PROGRESS', diff --git a/app/src/components/MeetingDrawer/ParticipantList/ListModerator.js b/app/src/components/MeetingDrawer/ParticipantList/ListModerator.js index c10506a..2fff283 100644 --- a/app/src/components/MeetingDrawer/ParticipantList/ListModerator.js +++ b/app/src/components/MeetingDrawer/ParticipantList/ListModerator.js @@ -63,6 +63,22 @@ const ListModerator = (props) => />
+ +