Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

functions.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* @flow */
  2. declare var interfaceConfig: Object;
  3. import {
  4. getPinnedParticipant,
  5. getLocalParticipant
  6. } from '../base/participants';
  7. /**
  8. * A selector for determining whether or not remote video thumbnails should be
  9. * displayed in the filmstrip.
  10. *
  11. * @param {Object} state - The full redux state.
  12. * @returns {boolean} - True if remote video thumbnails should be displayed.
  13. */
  14. export function shouldRemoteVideosBeVisible(state: Object) {
  15. const participants = state['features/base/participants'];
  16. const participantsCount = participants.length;
  17. const shouldShowVideos
  18. = participantsCount > 2
  19. // Always show the filmstrip when there is another participant to show
  20. // and the filmstrip is hovered, or local video is pinned, or the
  21. // toolbar is displayed.
  22. || (participantsCount > 1
  23. && (state['features/filmstrip'].hovered
  24. || state['features/toolbox'].visible
  25. || getLocalParticipant(state) === getPinnedParticipant(state)))
  26. || interfaceConfig.filmStripOnly
  27. || state['features/base/config'].disable1On1Mode;
  28. return Boolean(shouldShowVideos);
  29. }