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

functions.js 1.3KB

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