Raise hand first step (no signalling yet)
parent
886d77216a
commit
edd10bf034
|
|
@ -486,6 +486,35 @@ export default class RoomClient
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raiseHand()
|
||||||
|
{
|
||||||
|
logger.debug('raiseHand()');
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandInProgress(true));
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandState(true));
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandInProgress(false));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
lowerHand()
|
||||||
|
{
|
||||||
|
logger.debug('lowerHand()');
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandInProgress(true));
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandState(false));
|
||||||
|
|
||||||
|
this._dispatch(
|
||||||
|
stateActions.setRaiseHandInProgress(false));
|
||||||
|
}
|
||||||
|
|
||||||
restartIce()
|
restartIce()
|
||||||
{
|
{
|
||||||
logger.debug('restartIce()');
|
logger.debug('restartIce()');
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ class Room extends React.Component
|
||||||
onRoomLinkCopy,
|
onRoomLinkCopy,
|
||||||
onSetAudioMode,
|
onSetAudioMode,
|
||||||
onRestartIce,
|
onRestartIce,
|
||||||
|
onToggleHand,
|
||||||
onLeaveMeeting
|
onLeaveMeeting
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
|
@ -98,6 +99,16 @@ class Room extends React.Component
|
||||||
onClick={() => onRestartIce()}
|
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
|
<div
|
||||||
className={classnames('button', 'leave-meeting')}
|
className={classnames('button', 'leave-meeting')}
|
||||||
data-tip='Leave meeting'
|
data-tip='Leave meeting'
|
||||||
|
|
@ -125,6 +136,7 @@ Room.propTypes =
|
||||||
onRoomLinkCopy : PropTypes.func.isRequired,
|
onRoomLinkCopy : PropTypes.func.isRequired,
|
||||||
onSetAudioMode : PropTypes.func.isRequired,
|
onSetAudioMode : PropTypes.func.isRequired,
|
||||||
onRestartIce : PropTypes.func.isRequired,
|
onRestartIce : PropTypes.func.isRequired,
|
||||||
|
onToggleHand : PropTypes.func.isRequired,
|
||||||
onLeaveMeeting : PropTypes.func.isRequired
|
onLeaveMeeting : PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -158,6 +170,13 @@ const mapDispatchToProps = (dispatch) =>
|
||||||
{
|
{
|
||||||
dispatch(requestActions.restartIce());
|
dispatch(requestActions.restartIce());
|
||||||
},
|
},
|
||||||
|
onToggleHand : (enable) =>
|
||||||
|
{
|
||||||
|
if (enable)
|
||||||
|
dispatch(requestActions.raiseHand());
|
||||||
|
else
|
||||||
|
dispatch(requestActions.lowerHand());
|
||||||
|
},
|
||||||
onLeaveMeeting : () =>
|
onLeaveMeeting : () =>
|
||||||
{
|
{
|
||||||
dispatch(requestActions.leaveRoom());
|
dispatch(requestActions.leaveRoom());
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ const initialState =
|
||||||
webcamInProgress : false,
|
webcamInProgress : false,
|
||||||
audioOnly : false,
|
audioOnly : false,
|
||||||
audioOnlyInProgress : false,
|
audioOnlyInProgress : false,
|
||||||
|
raiseHand : false,
|
||||||
|
raiseHandInProgress : false,
|
||||||
restartIceInProgress : false
|
restartIceInProgress : false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -70,6 +72,20 @@ const me = (state = initialState, action) =>
|
||||||
return { ...state, audioOnlyInProgress: flag };
|
return { ...state, audioOnlyInProgress: flag };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'SET_RAISE_HAND_STATE':
|
||||||
|
{
|
||||||
|
const { enabled } = action.payload;
|
||||||
|
|
||||||
|
return { ...state, raiseHand: enabled };
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'SET_RAISE_HAND_STATE_IN_PROGRESS':
|
||||||
|
{
|
||||||
|
const { flag } = action.payload;
|
||||||
|
|
||||||
|
return { ...state, raiseHandInProgress: flag };
|
||||||
|
}
|
||||||
|
|
||||||
case 'SET_RESTART_ICE_IN_PROGRESS':
|
case 'SET_RESTART_ICE_IN_PROGRESS':
|
||||||
{
|
{
|
||||||
const { flag } = action.payload;
|
const { flag } = action.payload;
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,20 @@ export const disableAudioOnly = () =>
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const raiseHand = () =>
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
type : 'RAISE_HAND'
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const lowerHand = () =>
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
type : 'LOWER_HAND'
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export const restartIce = () =>
|
export const restartIce = () =>
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,20 @@ export default ({ dispatch, getState }) => (next) =>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'RAISE_HAND':
|
||||||
|
{
|
||||||
|
client.raiseHand();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'LOWER_HAND':
|
||||||
|
{
|
||||||
|
client.lowerHand();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'RESTART_ICE':
|
case 'RESTART_ICE':
|
||||||
{
|
{
|
||||||
client.restartIce();
|
client.restartIce();
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,22 @@ export const setAudioOnlyInProgress = (flag) =>
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const setRaiseHandState = (enabled) =>
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
type : 'SET_RAISE_HAND_STATE',
|
||||||
|
payload : { enabled }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const setRaiseHandInProgress = (flag) =>
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
type : 'SET_RAISE_HAND_STATE_IN_PROGRESS',
|
||||||
|
payload : { flag }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export const setRestartIceInProgress = (flag) =>
|
export const setRestartIceInProgress = (flag) =>
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.raise-hand {
|
||||||
|
background-image: url('/resources/images/leave-meeting.svg');
|
||||||
|
}
|
||||||
|
|
||||||
&.leave-meeting {
|
&.leave-meeting {
|
||||||
background-image: url('/resources/images/leave-meeting.svg');
|
background-image: url('/resources/images/leave-meeting.svg');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue