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/base/app/reducer.js

39 lines
862 B

// @flow
import { ReducerRegistry } from '../redux';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from './actionTypes';
ReducerRegistry.register('features/base/app', (state = {}, action) => {
switch (action.type) {
case APP_WILL_MOUNT: {
const { app } = action;
if (state.app !== app) {
return {
...state,
/**
* The one and only (i.e. singleton) {@link BaseApp} instance
* which is currently mounted.
*
* @type {BaseApp}
*/
app
};
}
break;
}
case APP_WILL_UNMOUNT:
if (state.app === action.app) {
return {
...state,
app: undefined
};
}
break;
}
return state;
});