Ensure sidebar settings state is not reset on sidebar toggle

This commit is contained in:
Torjus
2018-07-23 10:14:00 +02:00
parent 4431a40297
commit 0260186c65
2 changed files with 72 additions and 97 deletions
+13 -1
View File
@@ -22,7 +22,9 @@ const initialState =
raiseHand : false,
raiseHandInProgress : false,
restartIceInProgress : false,
picture : null
picture : null,
selectedWebcam : null,
selectedAudioDevice : null
};
const me = (state = initialState, action) =>
@@ -49,6 +51,16 @@ const me = (state = initialState, action) =>
};
}
case 'CHANGE_WEBCAM':
{
return { ...state, selectedWebcam: action.payload.deviceId };
}
case 'CHANGE_AUDIO_DEVICE':
{
return { ...state, selectedAudioDevice: action.payload.deviceId };
}
case 'SET_MEDIA_CAPABILITIES':
{
const { canSendMic, canSendWebcam } = action.payload;