Raise hand over network - still no state on server (new participants don't get the raised hand state of others until the others change their raised hand state)
This commit is contained in:
@@ -72,14 +72,14 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, audioOnlyInProgress: flag };
|
||||
}
|
||||
|
||||
case 'SET_RAISE_HAND_STATE':
|
||||
case 'SET_MY_RAISE_HAND_STATE':
|
||||
{
|
||||
const { enabled } = action.payload;
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, raiseHand: enabled };
|
||||
return { ...state, raiseHand: flag };
|
||||
}
|
||||
|
||||
case 'SET_RAISE_HAND_STATE_IN_PROGRESS':
|
||||
case 'SET_MY_RAISE_HAND_STATE_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