merge from develop
This commit is contained in:
@@ -30,6 +30,11 @@ const chat = (state = [], action) =>
|
||||
return [ ...state, ...chatHistory ];
|
||||
}
|
||||
|
||||
case 'CLEAR_CHAT':
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@ const files = (state = {}, action) =>
|
||||
return { ...state, [magnetUri]: newFile };
|
||||
}
|
||||
|
||||
case 'CLEAR_FILES':
|
||||
return {};
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ const lobbyPeers = (state = {}, action) =>
|
||||
|
||||
if (!oldLobbyPeer)
|
||||
{
|
||||
// Tried to update non-existant lobbyPeer. Has probably been promoted, or left.
|
||||
// Tried to update non-existent lobbyPeer. Has probably been promoted, or left.
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
+19
-12
@@ -1,11 +1,9 @@
|
||||
import * as userRoles from './userRoles';
|
||||
|
||||
const initialState =
|
||||
{
|
||||
id : null,
|
||||
picture : null,
|
||||
isMobile : false,
|
||||
roles : [ userRoles.ALL ],
|
||||
browser : null,
|
||||
roles : [ 'normal' ], // Default role
|
||||
canSendMic : false,
|
||||
canSendWebcam : false,
|
||||
canShareScreen : false,
|
||||
@@ -17,8 +15,8 @@ const initialState =
|
||||
screenShareInProgress : false,
|
||||
displayNameInProgress : false,
|
||||
loginEnabled : false,
|
||||
raiseHand : false,
|
||||
raiseHandInProgress : false,
|
||||
raisedHand : false,
|
||||
raisedHandInProgress : false,
|
||||
loggedIn : false,
|
||||
isSpeaking : false
|
||||
};
|
||||
@@ -41,9 +39,11 @@ const me = (state = initialState, action) =>
|
||||
};
|
||||
}
|
||||
|
||||
case 'SET_IS_MOBILE':
|
||||
case 'SET_BROWSER':
|
||||
{
|
||||
return { ...state, isMobile: true };
|
||||
const { browser } = action.payload;
|
||||
|
||||
return { ...state, browser };
|
||||
}
|
||||
|
||||
case 'LOGGED_IN':
|
||||
@@ -99,6 +99,13 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, audioDevices: devices };
|
||||
}
|
||||
|
||||
case 'SET_AUDIO_OUTPUT_DEVICES':
|
||||
{
|
||||
const { devices } = action.payload;
|
||||
|
||||
return { ...state, audioOutputDevices: devices };
|
||||
}
|
||||
|
||||
case 'SET_WEBCAM_DEVICES':
|
||||
{
|
||||
const { devices } = action.payload;
|
||||
@@ -127,18 +134,18 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, screenShareInProgress: flag };
|
||||
}
|
||||
|
||||
case 'SET_MY_RAISE_HAND_STATE':
|
||||
case 'SET_RAISED_HAND':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, raiseHand: flag };
|
||||
return { ...state, raisedHand: flag };
|
||||
}
|
||||
|
||||
case 'SET_MY_RAISE_HAND_STATE_IN_PROGRESS':
|
||||
case 'SET_RAISED_HAND_IN_PROGRESS':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
return { ...state, raiseHandInProgress: flag };
|
||||
return { ...state, raisedHandInProgress: flag };
|
||||
}
|
||||
|
||||
case 'SET_DISPLAY_NAME_IN_PROGRESS':
|
||||
|
||||
@@ -20,8 +20,12 @@ const peer = (state = {}, action) =>
|
||||
case 'SET_PEER_KICK_IN_PROGRESS':
|
||||
return { ...state, peerKickInProgress: action.payload.flag };
|
||||
|
||||
case 'SET_PEER_RAISE_HAND_STATE':
|
||||
return { ...state, raiseHandState: action.payload.raiseHandState };
|
||||
case 'SET_PEER_RAISED_HAND':
|
||||
return {
|
||||
...state,
|
||||
raisedHand : action.payload.raisedHand,
|
||||
raisedHandTimestamp : action.payload.raisedHandTimestamp
|
||||
};
|
||||
|
||||
case 'ADD_CONSUMER':
|
||||
{
|
||||
@@ -86,7 +90,7 @@ const peers = (state = {}, action) =>
|
||||
case 'SET_PEER_VIDEO_IN_PROGRESS':
|
||||
case 'SET_PEER_AUDIO_IN_PROGRESS':
|
||||
case 'SET_PEER_SCREEN_IN_PROGRESS':
|
||||
case 'SET_PEER_RAISE_HAND_STATE':
|
||||
case 'SET_PEER_RAISED_HAND':
|
||||
case 'SET_PEER_PICTURE':
|
||||
case 'ADD_CONSUMER':
|
||||
case 'ADD_PEER_ROLE':
|
||||
|
||||
+85
-22
@@ -1,27 +1,48 @@
|
||||
const initialState =
|
||||
{
|
||||
name : '',
|
||||
state : 'new', // new/connecting/connected/disconnected/closed,
|
||||
locked : false,
|
||||
inLobby : false,
|
||||
signInRequired : false,
|
||||
accessCode : '', // access code to the room if locked and joinByAccessCode == true
|
||||
joinByAccessCode : true, // if true: accessCode is a possibility to open the room
|
||||
activeSpeakerId : null,
|
||||
torrentSupport : false,
|
||||
showSettings : false,
|
||||
fullScreenConsumer : null, // ConsumerID
|
||||
windowConsumer : null, // ConsumerID
|
||||
toolbarsVisible : true,
|
||||
mode : 'democratic',
|
||||
selectedPeerId : null,
|
||||
spotlights : [],
|
||||
settingsOpen : false,
|
||||
lockDialogOpen : false,
|
||||
joined : false,
|
||||
muteAllInProgress : false,
|
||||
stopAllVideoInProgress : false,
|
||||
closeMeetingInProgress : false
|
||||
name : '',
|
||||
// new/connecting/connected/disconnected/closed,
|
||||
state : 'new',
|
||||
locked : false,
|
||||
inLobby : false,
|
||||
signInRequired : false,
|
||||
overRoomLimit : false,
|
||||
// access code to the room if locked and joinByAccessCode == true
|
||||
accessCode : '',
|
||||
// if true: accessCode is a possibility to open the room
|
||||
joinByAccessCode : true,
|
||||
activeSpeakerId : null,
|
||||
torrentSupport : false,
|
||||
showSettings : false,
|
||||
fullScreenConsumer : null, // ConsumerID
|
||||
windowConsumer : null, // ConsumerID
|
||||
toolbarsVisible : true,
|
||||
mode : window.config.defaultLayout || 'democratic',
|
||||
selectedPeerId : null,
|
||||
spotlights : [],
|
||||
settingsOpen : false,
|
||||
extraVideoOpen : false,
|
||||
currentSettingsTab : 'media', // media, appearence, advanced
|
||||
lockDialogOpen : false,
|
||||
joined : false,
|
||||
muteAllInProgress : false,
|
||||
lobbyPeersPromotionInProgress : false,
|
||||
stopAllVideoInProgress : false,
|
||||
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 : []
|
||||
}
|
||||
};
|
||||
|
||||
const room = (state = initialState, action) =>
|
||||
@@ -68,7 +89,12 @@ const room = (state = initialState, action) =>
|
||||
|
||||
return { ...state, signInRequired };
|
||||
}
|
||||
case 'SET_OVER_ROOM_LIMIT':
|
||||
{
|
||||
const { overRoomLimit } = action.payload;
|
||||
|
||||
return { ...state, overRoomLimit };
|
||||
}
|
||||
case 'SET_ACCESS_CODE':
|
||||
{
|
||||
const { accessCode } = action.payload;
|
||||
@@ -97,6 +123,20 @@ const room = (state = initialState, action) =>
|
||||
return { ...state, settingsOpen };
|
||||
}
|
||||
|
||||
case 'SET_EXTRA_VIDEO_OPEN':
|
||||
{
|
||||
const { extraVideoOpen } = action.payload;
|
||||
|
||||
return { ...state, extraVideoOpen };
|
||||
}
|
||||
|
||||
case 'SET_SETTINGS_TAB':
|
||||
{
|
||||
const { tab } = action.payload;
|
||||
|
||||
return { ...state, currentSettingsTab: tab };
|
||||
}
|
||||
|
||||
case 'SET_ROOM_ACTIVE_SPEAKER':
|
||||
{
|
||||
const { peerId } = action.payload;
|
||||
@@ -166,6 +206,9 @@ const room = (state = initialState, action) =>
|
||||
return { ...state, spotlights };
|
||||
}
|
||||
|
||||
case 'SET_LOBBY_PEERS_PROMOTION_IN_PROGRESS':
|
||||
return { ...state, lobbyPeersPromotionInProgress: action.payload.flag };
|
||||
|
||||
case 'MUTE_ALL_IN_PROGRESS':
|
||||
return { ...state, muteAllInProgress: action.payload.flag };
|
||||
|
||||
@@ -175,6 +218,26 @@ const room = (state = initialState, action) =>
|
||||
case 'CLOSE_MEETING_IN_PROGRESS':
|
||||
return { ...state, closeMeetingInProgress: action.payload.flag };
|
||||
|
||||
case 'CLEAR_CHAT_IN_PROGRESS':
|
||||
return { ...state, clearChatInProgress: action.payload.flag };
|
||||
|
||||
case 'CLEAR_FILE_SHARING_IN_PROGRESS':
|
||||
return { ...state, clearFileSharingInProgress: action.payload.flag };
|
||||
|
||||
case 'SET_USER_ROLES':
|
||||
{
|
||||
const { userRoles } = action.payload;
|
||||
|
||||
return { ...state, userRoles };
|
||||
}
|
||||
|
||||
case 'SET_PERMISSIONS_FROM_ROLES':
|
||||
{
|
||||
const { permissionsFromRoles } = action.payload;
|
||||
|
||||
return { ...state, permissionsFromRoles };
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -11,9 +11,12 @@ const initialState =
|
||||
echoCancellation : true,
|
||||
noiseSuppression : true,
|
||||
sampleSize : 16,
|
||||
resolution : 'medium', // low, medium, high, veryhigh, ultra
|
||||
// low, medium, high, veryhigh, ultra
|
||||
resolution : window.config.defaultResolution || 'medium',
|
||||
lastN : 4,
|
||||
permanentTopBar : true
|
||||
permanentTopBar : true,
|
||||
hiddenControls : false,
|
||||
notificationSounds : true
|
||||
};
|
||||
|
||||
const settings = (state = initialState, action) =>
|
||||
@@ -30,6 +33,11 @@ const settings = (state = initialState, action) =>
|
||||
return { ...state, selectedAudioDevice: action.payload.deviceId };
|
||||
}
|
||||
|
||||
case 'CHANGE_AUDIO_OUTPUT_DEVICE':
|
||||
{
|
||||
return { ...state, selectedAudioOutputDevice: action.payload.deviceId };
|
||||
}
|
||||
|
||||
case 'SET_DISPLAY_NAME':
|
||||
{
|
||||
const { displayName } = action.payload;
|
||||
@@ -135,6 +143,20 @@ const settings = (state = initialState, action) =>
|
||||
return { ...state, permanentTopBar };
|
||||
}
|
||||
|
||||
case 'TOGGLE_HIDDEN_CONTROLS':
|
||||
{
|
||||
const hiddenControls = !state.hiddenControls;
|
||||
|
||||
return { ...state, hiddenControls };
|
||||
}
|
||||
|
||||
case 'TOGGLE_NOTIFICATION_SOUNDS':
|
||||
{
|
||||
const notificationSounds = !state.notificationSounds;
|
||||
|
||||
return { ...state, notificationSounds };
|
||||
}
|
||||
|
||||
case 'SET_VIDEO_RESOLUTION':
|
||||
{
|
||||
const { resolution } = action.payload;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
export const ADMIN = 'admin';
|
||||
export const MODERATOR = 'moderator';
|
||||
export const AUTHENTICATED = 'authenticated';
|
||||
export const ALL = 'normal';
|
||||
Reference in New Issue
Block a user