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/video-layout/reducer.js

45 lines
997 B

// @flow
import { ReducerRegistry } from '../base/redux';
import {
SCREEN_SHARE_PARTICIPANTS_UPDATED,
SET_TILE_VIEW
} from './actionTypes';
const DEFAULT_STATE = {
screenShares: [],
/**
* The indicator which determines whether the video layout should display
* video thumbnails in a tiled layout.
*
* Note: undefined means that the user hasn't requested anything in particular yet, so
* we use our auto switching rules.
*
* @public
* @type {boolean}
*/
tileViewEnabled: undefined
};
const STORE_NAME = 'features/video-layout';
ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
switch (action.type) {
case SCREEN_SHARE_PARTICIPANTS_UPDATED: {
return {
...state,
screenShares: action.participantIds
};
}
case SET_TILE_VIEW:
return {
...state,
tileViewEnabled: action.enabled
};
}
return state;
});