Merge branch 'feature-raise-hand' into develop
This commit is contained in:
@@ -13,6 +13,8 @@ const initialState =
|
||||
screenShareInProgress : false,
|
||||
audioOnly : false,
|
||||
audioOnlyInProgress : false,
|
||||
raiseHand : false,
|
||||
raiseHandInProgress : false,
|
||||
restartIceInProgress : false
|
||||
};
|
||||
|
||||
@@ -33,11 +35,11 @@ const me = (state = initialState, action) =>
|
||||
|
||||
return { ...state, canSendMic, canSendWebcam };
|
||||
}
|
||||
|
||||
|
||||
case 'SET_SCREEN_CAPABILITIES':
|
||||
{
|
||||
const { canShareScreen, needExtension } = action.payload;
|
||||
|
||||
|
||||
return { ...state, canShareScreen, needExtension };
|
||||
}
|
||||
|
||||
@@ -87,6 +89,20 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, audioOnlyInProgress: flag };
|
||||
}
|
||||
|
||||
case 'SET_MY_RAISE_HAND_STATE':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, raiseHand: flag };
|
||||
}
|
||||
|
||||
case 'SET_MY_RAISE_HAND_STATE_IN_PROGRESS':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, raiseHandInProgress: flag };
|
||||
}
|
||||
|
||||
case 'SET_RESTART_ICE_IN_PROGRESS':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
@@ -34,6 +34,19 @@ const peers = (state = initialState, action) =>
|
||||
return { ...state, [newPeer.name]: newPeer };
|
||||
}
|
||||
|
||||
case 'SET_PEER_RAISE_HAND_STATE':
|
||||
{
|
||||
const { peerName, raiseHandState } = action.payload;
|
||||
const peer = state[peerName];
|
||||
|
||||
if (!peer)
|
||||
throw new Error('no Peer found');
|
||||
|
||||
const newPeer = { ...peer, raiseHandState };
|
||||
|
||||
return { ...state, [newPeer.name]: newPeer };
|
||||
}
|
||||
|
||||
case 'ADD_CONSUMER':
|
||||
{
|
||||
const { consumer, peerName } = action.payload;
|
||||
|
||||
Reference in New Issue
Block a user