Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/mobile/audio-mode/reducer.js

28 lines
691 B

// @flow
import { equals, set, ReducerRegistry } from '../../base/redux';
import { _SET_AUDIOMODE_DEVICES, _SET_AUDIOMODE_SUBSCRIPTIONS } from './actionTypes';
const DEFAULT_STATE = {
devices: [],
subscriptions: []
};
ReducerRegistry.register('features/mobile/audio-mode', (state = DEFAULT_STATE, action) => {
switch (action.type) {
case _SET_AUDIOMODE_DEVICES: {
const { devices } = action;
if (equals(state.devices, devices)) {
return state;
}
return set(state, 'devices', devices);
}
case _SET_AUDIOMODE_SUBSCRIPTIONS:
return set(state, 'subscriptions', action.subscriptions);
}
return state;
});