Moderator: Mute or stop video for a peer globally (#316)

This commit is contained in:
L4ky
2020-05-08 00:23:16 +02:00
committed by GitHub
parent 837aa1ace2
commit 2eab32cafa
5 changed files with 168 additions and 0 deletions
+14
View File
@@ -68,6 +68,18 @@ const peer = (state = {}, action) =>
return { ...state, roles };
}
case 'STOP_PEER_AUDIO_IN_PROGRESS':
return {
...state,
stopPeerAudioInProgress : action.payload.flag
};
case 'STOP_PEER_VIDEO_IN_PROGRESS':
return {
...state,
stopPeerVideoInProgress : action.payload.flag
};
default:
return state;
}
@@ -102,6 +114,8 @@ const peers = (state = {}, action) =>
case 'ADD_CONSUMER':
case 'ADD_PEER_ROLE':
case 'REMOVE_PEER_ROLE':
case 'STOP_PEER_AUDIO_IN_PROGRESS':
case 'STOP_PEER_VIDEO_IN_PROGRESS':
{
const oldPeer = state[action.payload.peerId];