Added toggle for advanced mode. Show more info and diagnostics.

This commit is contained in:
Håvar Aambø Fosstveit
2018-06-18 14:28:52 +02:00
parent cee74f9b29
commit 894009aa6a
9 changed files with 111 additions and 73 deletions
+9 -10
View File
@@ -3,9 +3,8 @@ const initialState =
url : null,
state : 'new', // new/connecting/connected/disconnected/closed,
activeSpeakerName : null,
peerHeight : 300,
peerWidth : 400,
showSettings : false
showSettings : false,
advancedMode : false
};
const room = (state = initialState, action) =>
@@ -36,13 +35,6 @@ const room = (state = initialState, action) =>
return { ...state, activeSpeakerName: peerName };
}
case 'SET_COMPONENT_SIZE':
{
const { peerWidth, peerHeight } = action.payload;
return { ...state, peerWidth: peerWidth, peerHeight: peerHeight };
}
case 'TOGGLE_SETTINGS':
{
const showSettings = !state.showSettings;
@@ -50,6 +42,13 @@ const room = (state = initialState, action) =>
return { ...state, showSettings };
}
case 'TOGGLE_ADVANCED_MODE':
{
const advancedMode = !state.advancedMode;
return { ...state, advancedMode };
}
default:
return state;
}