2017-05-23 18:58:07 +00:00
|
|
|
import { ReducerRegistry } from '../base/redux';
|
|
|
|
import {
|
|
|
|
SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY,
|
|
|
|
SET_FILMSTRIP_VISIBILITY
|
|
|
|
} from './actionTypes';
|
|
|
|
|
|
|
|
const DEFAULT_STATE = {
|
2017-08-12 00:27:30 +00:00
|
|
|
/**
|
|
|
|
* By default start with remote videos hidden for 1-on-1 mode and rely on
|
|
|
|
* other logic to invoke an action to make them visible when needed.
|
|
|
|
*/
|
|
|
|
remoteVideosVisible: false,
|
|
|
|
|
2017-05-23 18:58:07 +00:00
|
|
|
visible: true
|
|
|
|
};
|
|
|
|
|
|
|
|
ReducerRegistry.register(
|
|
|
|
'features/filmstrip',
|
|
|
|
(state = DEFAULT_STATE, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
remoteVideosVisible: action.remoteVideosVisible
|
|
|
|
};
|
|
|
|
case SET_FILMSTRIP_VISIBILITY:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
visible: action.visible
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|