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.

subscriber.js 723B

123456789101112131415161718192021222324
  1. // @flow
  2. import {
  3. VIDEO_QUALITY_LEVELS,
  4. setMaxReceiverVideoQuality
  5. } from '../base/conference';
  6. import { StateListenerRegistry } from '../base/redux';
  7. import { selectParticipant } from '../large-video';
  8. import { shouldDisplayTileView } from './functions';
  9. /**
  10. * StateListenerRegistry provides a reliable way of detecting changes to
  11. * preferred layout state and dispatching additional actions.
  12. */
  13. StateListenerRegistry.register(
  14. /* selector */ state => shouldDisplayTileView(state),
  15. /* listener */ (displayTileView, { dispatch }) => {
  16. dispatch(selectParticipant());
  17. if (!displayTileView) {
  18. dispatch(setMaxReceiverVideoQuality(VIDEO_QUALITY_LEVELS.HIGH));
  19. }
  20. }
  21. );