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.

actions.web.js 883B

12345678910111213141516171819202122232425262728
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
  4. export * from './actions.any';
  5. /**
  6. * Resizes the large video container based on the dimensions provided.
  7. *
  8. * @param {number} width - Width that needs to be applied on the large video container.
  9. * @param {number} height - Height that needs to be applied on the large video container.
  10. * @returns {Function}
  11. */
  12. export function resizeLargeVideo(width: number, height: number) {
  13. return (dispatch: Dispatch<any>, getState: Function) => {
  14. const state = getState();
  15. const largeVideo = state['features/large-video'];
  16. if (largeVideo) {
  17. const largeVideoContainer = VideoLayout.getLargeVideo();
  18. largeVideoContainer.updateContainerSize(width, height);
  19. largeVideoContainer.resize();
  20. }
  21. };
  22. }