Added support for muting audio and video from participants

This commit is contained in:
Håvar Aambø Fosstveit
2018-06-15 09:29:47 +02:00
parent e105670fd9
commit c18d982c1b
9 changed files with 414 additions and 65 deletions
+26
View File
@@ -34,6 +34,32 @@ const peers = (state = initialState, action) =>
return { ...state, [newPeer.name]: newPeer };
}
case 'SET_PEER_VIDEO_IN_PROGRESS':
{
const { peerName, flag } = action.payload;
const peer = state[peerName];
if (!peer)
throw new Error('no Peer found');
const newPeer = { ...peer, peerVideoInProgress: flag };
return { ...state, [newPeer.name]: newPeer };
}
case 'SET_PEER_AUDIO_IN_PROGRESS':
{
const { peerName, flag } = action.payload;
const peer = state[peerName];
if (!peer)
throw new Error('no Peer found');
const newPeer = { ...peer, peerAudioInProgress: flag };
return { ...state, [newPeer.name]: newPeer };
}
case 'SET_PEER_RAISE_HAND_STATE':
{
const { peerName, raiseHandState } = action.payload;