jiti-meet/react/features/mobile/external-api/reducer.ts

26 lines
606 B
TypeScript
Raw Normal View History

import ReducerRegistry from '../../base/redux/ReducerRegistry';
import { SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes';
export interface IMobileExternalApiState {
screenShares: string[];
}
const DEFAULT_STATE = {
screenShares: []
};
2022-09-05 09:05:07 +00:00
ReducerRegistry.register<IMobileExternalApiState>('features/mobile/external-api',
(state = DEFAULT_STATE, action): IMobileExternalApiState => {
switch (action.type) {
case SCREEN_SHARE_PARTICIPANTS_UPDATED: {
return {
...state,
screenShares: action.participantIds
};
}
}
return state;
});