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.

functions.js 570B

123456789101112131415161718192021
  1. // @flow
  2. import { toState } from '../base/redux';
  3. /**
  4. * Checks whether rtcstats is enabled or not.
  5. *
  6. * @param {Function|Object} stateful - The redux store or {@code getState} function.
  7. * @returns {boolean}
  8. */
  9. export function isRtcstatsEnabled(stateful: Function | Object) {
  10. // TODO: Remove when rtcstats is fully cimpatible with mobile.
  11. if (navigator.product === 'ReactNative') {
  12. return false;
  13. }
  14. const state = toState(stateful);
  15. const config = state['features/base/config'];
  16. return config?.analytics?.rtcstatsEnabled ?? false;
  17. }