Added toggle for advanced mode. Show more info and diagnostics.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,6 @@ export const setRoomActiveSpeaker = (peerName) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const onComponentResize = (peerWidth, peerHeight) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_COMPONENT_SIZE',
|
||||
payload : { peerWidth, peerHeight }
|
||||
};
|
||||
};
|
||||
|
||||
export const setMe = ({ peerName, displayName, displayNameSet, device }) =>
|
||||
{
|
||||
return {
|
||||
@@ -94,6 +86,13 @@ export const setDisplayName = (displayName) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const toggleAdvancedMode = () =>
|
||||
{
|
||||
return {
|
||||
type : 'TOGGLE_ADVANCED_MODE'
|
||||
};
|
||||
};
|
||||
|
||||
export const setAudioOnlyState = (enabled) =>
|
||||
{
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user