您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.js 1.3KB

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