Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829
  1. import { getParticipantCount } from '../base/participants/functions';
  2. import { toState } from '../base/redux';
  3. /**
  4. * Gets the value of a specific React {@code Component} prop of the currently
  5. * mounted {@link App}.
  6. *
  7. * @param {Function|Object} stateful - The redux store or {@code getState}
  8. * function.
  9. * @param {string} propName - The name of the React {@code Component} prop of
  10. * the currently mounted {@code App} to get.
  11. * @returns {*} The value of the specified React {@code Component} prop of the
  12. * currently mounted {@code App}.
  13. */
  14. export function doesEveryoneSupportE2EE(stateful) {
  15. const state = toState(stateful);
  16. const { everyoneSupportE2EE } = state['features/e2ee'];
  17. const { e2eeSupported } = state['features/base/conference'];
  18. const participantCount = getParticipantCount(state);
  19. if (typeof everyoneSupportE2EE === 'undefined' && participantCount === 1) {
  20. // This will happen if we are alone.
  21. return e2eeSupported;
  22. }
  23. return everyoneSupportE2EE;
  24. }