Merge remote-tracking branch 'origin/develop' into feat-audio-settings
This commit is contained in:
@@ -110,6 +110,11 @@ const consumers = (state = initialState, action) =>
|
||||
return { ...state, [consumerId]: newConsumer };
|
||||
}
|
||||
|
||||
case 'CLEAR_CONSUMERS':
|
||||
{
|
||||
return initialState;
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const peer = (state = {}, action) =>
|
||||
const initialState = {};
|
||||
|
||||
const peer = (state = initialState, action) =>
|
||||
{
|
||||
switch (action.type)
|
||||
{
|
||||
@@ -68,12 +70,24 @@ 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;
|
||||
}
|
||||
};
|
||||
|
||||
const peers = (state = {}, action) =>
|
||||
const peers = (state = initialState, action) =>
|
||||
{
|
||||
switch (action.type)
|
||||
{
|
||||
@@ -102,6 +116,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];
|
||||
|
||||
@@ -125,6 +141,11 @@ const peers = (state = {}, action) =>
|
||||
return { ...state, [oldPeer.id]: peer(oldPeer, action) };
|
||||
}
|
||||
|
||||
case 'CLEAR_PEERS':
|
||||
{
|
||||
return initialState;
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,17 @@ const producers = (state = initialState, action) =>
|
||||
return { ...state, [producerId]: newProducer };
|
||||
}
|
||||
|
||||
case 'SET_PRODUCER_SCORE':
|
||||
{
|
||||
const { producerId, score } = action.payload;
|
||||
|
||||
const producer = state[producerId];
|
||||
|
||||
const newProducer = { ...producer, score };
|
||||
|
||||
return { ...state, [producerId]: newProducer };
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
+29
-18
@@ -22,6 +22,8 @@ const initialState =
|
||||
spotlights : [],
|
||||
settingsOpen : false,
|
||||
extraVideoOpen : false,
|
||||
helpOpen : false,
|
||||
aboutOpen : false,
|
||||
currentSettingsTab : 'media', // media, appearence, advanced
|
||||
lockDialogOpen : false,
|
||||
joined : false,
|
||||
@@ -31,18 +33,8 @@ const initialState =
|
||||
closeMeetingInProgress : false,
|
||||
clearChatInProgress : false,
|
||||
clearFileSharingInProgress : false,
|
||||
userRoles : { NORMAL: 'normal' }, // Default role
|
||||
permissionsFromRoles : {
|
||||
CHANGE_ROOM_LOCK : [],
|
||||
PROMOTE_PEER : [],
|
||||
SEND_CHAT : [],
|
||||
MODERATE_CHAT : [],
|
||||
SHARE_SCREEN : [],
|
||||
EXTRA_VIDEO : [],
|
||||
SHARE_FILE : [],
|
||||
MODERATE_FILES : [],
|
||||
MODERATE_ROOM : []
|
||||
}
|
||||
roomPermissions : null,
|
||||
allowWhenRoleMissing : null
|
||||
};
|
||||
|
||||
const room = (state = initialState, action) =>
|
||||
@@ -130,6 +122,20 @@ const room = (state = initialState, action) =>
|
||||
return { ...state, extraVideoOpen };
|
||||
}
|
||||
|
||||
case 'SET_HELP_OPEN':
|
||||
{
|
||||
const { helpOpen } = action.payload;
|
||||
|
||||
return { ...state, helpOpen };
|
||||
}
|
||||
|
||||
case 'SET_ABOUT_OPEN':
|
||||
{
|
||||
const { aboutOpen } = action.payload;
|
||||
|
||||
return { ...state, aboutOpen };
|
||||
}
|
||||
|
||||
case 'SET_SETTINGS_TAB':
|
||||
{
|
||||
const { tab } = action.payload;
|
||||
@@ -206,6 +212,11 @@ const room = (state = initialState, action) =>
|
||||
return { ...state, spotlights };
|
||||
}
|
||||
|
||||
case 'CLEAR_SPOTLIGHTS':
|
||||
{
|
||||
return { ...state, spotlights: [] };
|
||||
}
|
||||
|
||||
case 'SET_LOBBY_PEERS_PROMOTION_IN_PROGRESS':
|
||||
return { ...state, lobbyPeersPromotionInProgress: action.payload.flag };
|
||||
|
||||
@@ -224,18 +235,18 @@ const room = (state = initialState, action) =>
|
||||
case 'CLEAR_FILE_SHARING_IN_PROGRESS':
|
||||
return { ...state, clearFileSharingInProgress: action.payload.flag };
|
||||
|
||||
case 'SET_USER_ROLES':
|
||||
case 'SET_ROOM_PERMISSIONS':
|
||||
{
|
||||
const { userRoles } = action.payload;
|
||||
const { roomPermissions } = action.payload;
|
||||
|
||||
return { ...state, userRoles };
|
||||
return { ...state, roomPermissions };
|
||||
}
|
||||
|
||||
case 'SET_PERMISSIONS_FROM_ROLES':
|
||||
case 'SET_ALLOW_WHEN_ROLE_MISSING':
|
||||
{
|
||||
const { permissionsFromRoles } = action.payload;
|
||||
const { allowWhenRoleMissing } = action.payload;
|
||||
|
||||
return { ...state, permissionsFromRoles };
|
||||
return { ...state, allowWhenRoleMissing };
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@@ -20,6 +20,8 @@ const initialState =
|
||||
hiddenControls : false,
|
||||
showNotifications : true,
|
||||
notificationSounds : true,
|
||||
buttonControlBar : window.config.buttonControlBar || false,
|
||||
drawerOverlayed : window.config.drawerOverlayed || true,
|
||||
...window.config.defaultAudio
|
||||
};
|
||||
|
||||
@@ -161,6 +163,20 @@ const settings = (state = initialState, action) =>
|
||||
return { ...state, permanentTopBar };
|
||||
}
|
||||
|
||||
case 'TOGGLE_BUTTON_CONTROL_BAR':
|
||||
{
|
||||
const buttonControlBar = !state.buttonControlBar;
|
||||
|
||||
return { ...state, buttonControlBar };
|
||||
}
|
||||
|
||||
case 'TOGGLE_DRAWER_OVERLAYED':
|
||||
{
|
||||
const drawerOverlayed = !state.drawerOverlayed;
|
||||
|
||||
return { ...state, drawerOverlayed };
|
||||
}
|
||||
|
||||
case 'TOGGLE_HIDDEN_CONTROLS':
|
||||
{
|
||||
const hiddenControls = !state.hiddenControls;
|
||||
|
||||
Reference in New Issue
Block a user