Moderator: Mute all screen sharing
parent
69244bdf12
commit
f54ed84edb
|
|
@ -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()');
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -63,6 +63,22 @@ const ListModerator = (props) =>
|
|||
/>
|
||||
</Button>
|
||||
<div className={classes.divider} />
|
||||
<Button
|
||||
aria-label={intl.formatMessage({
|
||||
id : 'room.stopAllScreenSharing',
|
||||
defaultMessage : 'Stop all screen sharing'
|
||||
})}
|
||||
variant='contained'
|
||||
color='secondary'
|
||||
disabled={room.stopAllScreenSharingInProgress}
|
||||
onClick={() => roomClient.stopAllPeerScreenSharing()}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='room.stopAllScreenSharing'
|
||||
defaultMessage='Stop all screen sharing'
|
||||
/>
|
||||
</Button>
|
||||
<div className={classes.divider} />
|
||||
<Button
|
||||
aria-label={intl.formatMessage({
|
||||
id : 'room.closeMeeting',
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ const ListPeer = (props) =>
|
|||
{ isModerator && screenConsumer &&
|
||||
<Tooltip
|
||||
title={intl.formatMessage({
|
||||
id : 'tooltip.muteScreenSharing',
|
||||
id : 'tooltip.muteScreenSharingModerator',
|
||||
defaultMessage : 'Mute participant screen share globally'
|
||||
})}
|
||||
placement='bottom'
|
||||
|
|
|
|||
|
|
@ -226,6 +226,9 @@ const room = (state = initialState, action) =>
|
|||
case 'STOP_ALL_VIDEO_IN_PROGRESS':
|
||||
return { ...state, stopAllVideoInProgress: action.payload.flag };
|
||||
|
||||
case 'STOP_ALL_SCREEN_SHARING_IN_PROGRESS':
|
||||
return { ...state, stopAllScreenSharingInProgress: action.payload.flag };
|
||||
|
||||
case 'CLOSE_MEETING_IN_PROGRESS':
|
||||
return { ...state, closeMeetingInProgress: action.payload.flag };
|
||||
|
||||
|
|
|
|||
|
|
@ -1441,6 +1441,19 @@ class Room extends EventEmitter
|
|||
break;
|
||||
}
|
||||
|
||||
case 'moderator:stopAllScreenSharing':
|
||||
{
|
||||
if (!this._hasPermission(peer, MODERATE_ROOM))
|
||||
throw new Error('peer not authorized');
|
||||
|
||||
// Spread to others
|
||||
this._notification(peer.socket, 'moderator:stopScreenSharing', null, true);
|
||||
|
||||
cb();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'moderator:stopScreenSharing':
|
||||
{
|
||||
if (!this._hasPermission(peer, MODERATE_ROOM))
|
||||
|
|
|
|||
Loading…
Reference in New Issue