Started work on settings dialog. Possible to switch camera.
This commit is contained in:
@@ -9,6 +9,7 @@ const initialState =
|
||||
canShareScreen : false,
|
||||
needExtension : false,
|
||||
canChangeWebcam : false,
|
||||
webcamDevices : null,
|
||||
webcamInProgress : false,
|
||||
screenShareInProgress : false,
|
||||
audioOnly : false,
|
||||
@@ -50,6 +51,13 @@ const me = (state = initialState, action) =>
|
||||
return { ...state, canChangeWebcam };
|
||||
}
|
||||
|
||||
case 'SET_WEBCAM_DEVICES':
|
||||
{
|
||||
const devices = action.payload;
|
||||
|
||||
return { ...state, webcamDevices: devices };
|
||||
}
|
||||
|
||||
case 'SET_WEBCAM_IN_PROGRESS':
|
||||
{
|
||||
const { flag } = action.payload;
|
||||
|
||||
@@ -4,7 +4,8 @@ const initialState =
|
||||
state : 'new', // new/connecting/connected/disconnected/closed,
|
||||
activeSpeakerName : null,
|
||||
peerHeight : 300,
|
||||
peerWidth : 400
|
||||
peerWidth : 400,
|
||||
showSettings : false
|
||||
};
|
||||
|
||||
const room = (state = initialState, action) =>
|
||||
@@ -42,6 +43,13 @@ const room = (state = initialState, action) =>
|
||||
return { ...state, peerWidth: peerWidth, peerHeight: peerHeight };
|
||||
}
|
||||
|
||||
case 'TOGGLE_SETTINGS':
|
||||
{
|
||||
const showSettings = !state.showSettings;
|
||||
|
||||
return { ...state, showSettings };
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -57,10 +57,11 @@ export const disableWebcam = () =>
|
||||
};
|
||||
};
|
||||
|
||||
export const changeWebcam = () =>
|
||||
export const changeWebcam = (deviceId) =>
|
||||
{
|
||||
return {
|
||||
type : 'CHANGE_WEBCAM'
|
||||
type : 'CHANGE_WEBCAM',
|
||||
payload : { deviceId }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -83,7 +83,9 @@ export default ({ dispatch, getState }) => (next) =>
|
||||
|
||||
case 'CHANGE_WEBCAM':
|
||||
{
|
||||
client.changeWebcam();
|
||||
const { deviceId } = action.payload;
|
||||
|
||||
client.changeWebcam(deviceId);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,14 @@ export const setCanChangeWebcam = (flag) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const setWebcamDevices = (devices) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_WEBCAM_DEVICES',
|
||||
payload : devices
|
||||
};
|
||||
};
|
||||
|
||||
export const setDisplayName = (displayName) =>
|
||||
{
|
||||
return {
|
||||
@@ -110,6 +118,13 @@ export const setMyRaiseHandState = (flag) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const toggleSettings = () =>
|
||||
{
|
||||
return {
|
||||
type : 'TOGGLE_SETTINGS'
|
||||
};
|
||||
};
|
||||
|
||||
export const setMyRaiseHandStateInProgress = (flag) =>
|
||||
{
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user