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.

12345678910111213141516171819202122232425262728293031323334
  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 shouldShowVideos
  16. = state['features/base/config'].disable1On1Mode
  17. || interfaceConfig.filmStripOnly
  18. // This is not a 1-on-1 call.
  19. || participants.length > 2
  20. // There is another participant and the local participant is pinned.
  21. || (participants.length > 1
  22. && getLocalParticipant(state) === getPinnedParticipant(state))
  23. // There is any non-person participant, like a shared video.
  24. || participants.find(participant => participant.isBot);
  25. return Boolean(shouldShowVideos);
  26. }