Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

functions.js 1.1KB

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