Merge pull request #6224 from Tainan404/breakout-room-html5

Change the method permissions for moderator
This commit is contained in:
Anton Georgiev 2018-11-12 11:25:51 -05:00 committed by GitHub
commit 10e9cb9c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 36 additions and 28 deletions

View File

@ -109,7 +109,6 @@ class ActionsDropdown extends Component {
togglePollMenu,
meetingIsBreakout,
hasBreakoutRoom,
meetingName,
} = this.props;
return _.compact([
@ -142,7 +141,7 @@ class ActionsDropdown extends Component {
onClick={toggleRecording}
/>
: null),
(isUserPresenter && !meetingIsBreakout && !hasBreakoutRoom ?
(isUserModerator && !meetingIsBreakout && !hasBreakoutRoom ?
<DropdownListItem
icon="rooms"
label={intl.formatMessage(intlMessages.createBreakoutRoom)}

View File

@ -36,9 +36,8 @@ const intlMessages = defineMessages({
description: 'room intl to name the breakout meetings',
},
});
const BREAKOUT_CONFIG = Meteor.settings.public.breakout;
const MIN_BREAKOUT_ROOMS = BREAKOUT_CONFIG.rooms.min;
const MAX_BREAKOUT_ROOMS = BREAKOUT_CONFIG.rooms.max;
const MIN_BREAKOUT_ROOMS = 2;
const MAX_BREAKOUT_ROOMS = 8;
class BreakoutRoom extends Component {
constructor(props) {
@ -60,7 +59,7 @@ class BreakoutRoom extends Component {
const {
createBreakoutRoom,
meetingName,
intl
intl,
} = this.props;
const { numberOfRooms, durationTime } = this.state;
@ -113,7 +112,12 @@ class BreakoutRoom extends Component {
<div className={styles.breakoutSettings}>
<label>
<p className={styles.labelText}>{intl.formatMessage(intlMessages.numberOfRooms)}</p>
<select name="numberOfRooms" className={styles.inputRooms} value={this.state.numberOfRooms} onChange={this.changeNumberOfRooms}>
<select
name="numberOfRooms"
className={styles.inputRooms}
value={this.state.numberOfRooms}
onChange={this.changeNumberOfRooms}
>
{
_.range(MIN_BREAKOUT_ROOMS, MAX_BREAKOUT_ROOMS + 1).map(item => (<option key={_.uniqueId('value-')}>{item}</option>))
}
@ -122,7 +126,13 @@ class BreakoutRoom extends Component {
<label >
<p className={styles.labelText}>{intl.formatMessage(intlMessages.duration)}</p>
<div className={styles.durationArea}>
<input type="number" className={styles.duration} min={MIN_BREAKOUT_ROOMS} value={this.state.durationTime} onChange={this.changeDurationTime} />
<input
type="number"
className={styles.duration}
min={MIN_BREAKOUT_ROOMS}
value={this.state.durationTime}
onChange={this.changeDurationTime}
/>
<span>
<HoldButton
key="decrease-breakout-time"

View File

@ -6,8 +6,8 @@ import Modal from 'react-modal';
import cx from 'classnames';
import Resizable from 're-resizable';
import browser from 'browser-detect';
import BreakoutRoomContainer from '/imports/ui/components/breakout-room/container';
import PollingContainer from '/imports/ui/components/polling/container';
import BreakoutRoomContainer from '/imports/ui/components/Breakout-room/container';
import ToastContainer from '../toast/container';
import ModalContainer from '../modal/container';
import NotificationsBarContainer from '../notifications-bar/container';

View File

@ -92,8 +92,8 @@ class BreakoutRoom extends Component {
}
transferUserToBreakoutRoom(breakoutId) {
const { transferToBreakout, meetingId } = this.props;
transferToBreakout(meetingId, breakoutId);
const { transferToBreakout } = this.props;
transferToBreakout(breakoutId);
this.setState({ joinedAudioOnly: true, breakoutId });
}
returnBackToMeeeting(breakoutId) {
@ -105,7 +105,7 @@ class BreakoutRoom extends Component {
renderUserActions(breakoutId) {
const {
isMicrophoneUser,
isPresenter,
isModerator,
intl,
} = this.props;
@ -117,7 +117,7 @@ class BreakoutRoom extends Component {
waiting,
} = this.state;
const presenterJoinedAudio = isMicrophoneUser && isPresenter;
const moderatorJoinedAudio = isMicrophoneUser && isModerator;
const disable = waiting && requestedBreakoutId !== breakoutId;
const audioAction = joinedAudioOnly ?
() => this.returnBackToMeeeting(breakoutId) :
@ -133,13 +133,13 @@ class BreakoutRoom extends Component {
className={styles.joinButton}
/>
{
presenterJoinedAudio ?
moderatorJoinedAudio ?
[
('|'),
(
<Button
label={
presenterJoinedAudio &&
moderatorJoinedAudio &&
stateBreakoutId === breakoutId &&
joinedAudioOnly
?

View File

@ -21,7 +21,6 @@ export default withTracker((props) => {
closeBreakoutPanel,
} = Service;
const breakoutRooms = findBreakouts();
const isMicrophoneUser = AudioService.isConnected() && !AudioService.isListenOnly();
return {
@ -33,7 +32,7 @@ export default withTracker((props) => {
transferUserToMeeting,
transferToBreakout,
isMicrophoneUser,
meetingId,
meetingId: meetingId(),
isPresenter: isPresenter(),
isModerator: isModerator(),
closeBreakoutPanel,

View File

@ -38,7 +38,7 @@ const requestJoinURL = (breakoutId) => {
const transferUserToMeeting = (fromMeetingId, toMeetingId) => makeCall('transferUser', fromMeetingId, toMeetingId);
const transferToBreakout = (fromMeetingId, breakoutId) => {
const transferToBreakout = (breakoutId) => {
const breakoutRooms = findBreakouts();
const breakoutRoom = breakoutRooms.filter(breakout => breakout.breakoutId === breakoutId).shift();
const breakoutMeeting = Meetings.findOne({
@ -48,7 +48,7 @@ const transferToBreakout = (fromMeetingId, breakoutId) => {
{ 'meetingProp.isBreakout': true },
],
});
transferUserToMeeting(fromMeetingId, breakoutMeeting.meetingId);
transferUserToMeeting(Auth.meetingID, breakoutMeeting.meetingId);
};
const isPresenter = () => {
@ -63,6 +63,7 @@ const isModerator = () => {
return mappedUser.isModerator;
};
const closeBreakoutPanel = () => Session.set('breakoutRoomIsOpen', false);
export default {
@ -72,7 +73,7 @@ export default {
breakoutRoomUser,
transferUserToMeeting,
transferToBreakout,
meetingId: Auth.meetingID,
meetingId: () => Auth.meetingID,
isPresenter,
closeBreakoutPanel,
isModerator,

View File

@ -23,6 +23,10 @@ const intlMessage = defineMessages({
id: 'app.error.meeting.ended',
description: 'user logged conference',
},
'acl-not-allowed': {
id: 'app.error.removed',
description: 'Message to display when user is removed from the conference',
},
messageEnded: {
id: 'app.meeting.endedMessage',
description: 'message saying to go back to home screen',

View File

@ -143,9 +143,10 @@ public:
- ejectUserFromVoice
- toggleRecording
- endAllBreakouts
- transferUser
- createBreakoutRoom
presenter:
methods:
- assignPresenter
- switchSlide
- modifyWhiteboardAccess
- undoAnnotation
@ -156,16 +157,10 @@ public:
- setPresentation
- zoomSlide
- requestPresentationUploadToken
- transferUser
- createBreakoutRoom
- startPoll
- stopPoll
- publishPoll
breakout:
rooms:
min: 2
max: 8
poll:
poll:
max_custom: 5
chat:
min_message_length: 1