mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
use send the share screen sources using the external api --------- Co-authored-by: Gabriel Borlea <gabriel.borlea@8x8.com>
35 lines
819 B
TypeScript
35 lines
819 B
TypeScript
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
|
|
|
import { DELETE_DESKTOP_SOURCES, SET_DESKTOP_SOURCES } from './actionTypes';
|
|
import { IDesktopSources } from './types';
|
|
|
|
/**
|
|
* The initial state of the web-hid feature.
|
|
*/
|
|
const DEFAULT_STATE: IDesktopPicker = {
|
|
sources: {} as IDesktopSources
|
|
};
|
|
|
|
export interface IDesktopPicker {
|
|
sources: IDesktopSources;
|
|
}
|
|
|
|
ReducerRegistry.register<IDesktopPicker>(
|
|
'features/desktop-picker',
|
|
(state: IDesktopPicker = DEFAULT_STATE, action): IDesktopPicker => {
|
|
switch (action.type) {
|
|
case SET_DESKTOP_SOURCES:
|
|
return {
|
|
...state,
|
|
sources: action.sources
|
|
};
|
|
case DELETE_DESKTOP_SOURCES:
|
|
return {
|
|
...state,
|
|
...DEFAULT_STATE
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
});
|