2018-04-12 19:58:20 +00:00
|
|
|
import { SETTINGS_UPDATED } from './actionTypes';
|
2022-09-14 07:54:56 +00:00
|
|
|
import { ISettingsState } from './reducer';
|
2018-04-12 19:58:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create an action for when the settings are updated.
|
|
|
|
*
|
|
|
|
* @param {Object} settings - The new (partial) settings properties.
|
|
|
|
* @returns {{
|
|
|
|
* type: SETTINGS_UPDATED,
|
|
|
|
* settings: {
|
|
|
|
* audioOutputDeviceId: string,
|
|
|
|
* avatarURL: string,
|
|
|
|
* cameraDeviceId: string,
|
|
|
|
* displayName: string,
|
|
|
|
* email: string,
|
|
|
|
* localFlipX: boolean,
|
|
|
|
* micDeviceId: string,
|
|
|
|
* serverURL: string,
|
2021-11-10 11:19:40 +00:00
|
|
|
* soundsReactions: boolean,
|
2018-04-12 19:58:20 +00:00
|
|
|
* startAudioOnly: boolean,
|
|
|
|
* startWithAudioMuted: boolean,
|
2021-11-10 11:19:40 +00:00
|
|
|
* startWithVideoMuted: boolean,
|
|
|
|
* startWithReactionsMuted: boolean
|
2018-04-12 19:58:20 +00:00
|
|
|
* }
|
|
|
|
* }}
|
|
|
|
*/
|
2022-09-14 07:54:56 +00:00
|
|
|
export function updateSettings(settings: Partial<ISettingsState>) {
|
2018-04-12 19:58:20 +00:00
|
|
|
return {
|
|
|
|
type: SETTINGS_UPDATED,
|
|
|
|
settings
|
|
|
|
};
|
|
|
|
}
|