Merge branch 'feature-raise-hand' into develop

This commit is contained in:
Stefan Otto
2018-04-24 11:08:41 +02:00
15 changed files with 273 additions and 10 deletions
+4
View File
@@ -59,6 +59,10 @@ const Peer = (props) =>
return (
<div data-component='Peer'>
<div className='indicators'>
{peer.raiseHandState ?
<div className='icon raise-hand' />
:null
}
{!micEnabled ?
<div className='icon mic-off' />
:null
+23 -4
View File
@@ -24,10 +24,11 @@ class Room extends React.Component
onRoomLinkCopy,
onSetAudioMode,
onRestartIce,
onLeaveMeeting,
onShareScreen,
onUnShareScreen,
onNeedExtension
onNeedExtension,
onToggleHand,
onLeaveMeeting
} = this.props;
let screenState;
@@ -157,6 +158,16 @@ class Room extends React.Component
onClick={() => onRestartIce()}
/>
<div
className={classnames('button', 'raise-hand', {
on : me.raiseHand,
disabled : me.raiseHandInProgress
})}
data-tip='Raise hand'
data-type='dark'
onClick={() => onToggleHand(!me.raiseHand)}
/>
<div
className={classnames('button', 'leave-meeting')}
data-tip='Leave meeting'
@@ -185,10 +196,11 @@ Room.propTypes =
onRoomLinkCopy : PropTypes.func.isRequired,
onSetAudioMode : PropTypes.func.isRequired,
onRestartIce : PropTypes.func.isRequired,
onLeaveMeeting : PropTypes.func.isRequired,
onShareScreen : PropTypes.func.isRequired,
onUnShareScreen : PropTypes.func.isRequired,
onNeedExtension : PropTypes.func.isRequired
onNeedExtension : PropTypes.func.isRequired,
onToggleHand : PropTypes.func.isRequired,
onLeaveMeeting : PropTypes.func.isRequired
};
const mapStateToProps = (state) =>
@@ -226,6 +238,13 @@ const mapDispatchToProps = (dispatch) =>
{
dispatch(requestActions.restartIce());
},
onToggleHand : (enable) =>
{
if (enable)
dispatch(requestActions.raiseHand());
else
dispatch(requestActions.lowerHand());
},
onLeaveMeeting : () =>
{
dispatch(requestActions.leaveRoom());