Ensure sidebar settings state is not reset on sidebar toggle

This commit is contained in:
Torjus committed 2018-07-23 10:14:00 +02:00
1 parent 4431a40297
commit 0260186c65
2 files changed
+72 -97

No files matched your search

+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;