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.

1234567891011121314151617181920212223242526272829
  1. import { IReduxState } from '../../../app/types';
  2. import {
  3. FOUR_GROUPS_DASH_SEPARATED,
  4. GOOGLE_PRIVACY_POLICY,
  5. JITSI_LIVE_STREAMING_HELP_LINK,
  6. YOUTUBE_TERMS_URL
  7. } from './constants';
  8. /**
  9. * Get the live streaming options.
  10. *
  11. * @param {Object} state - The global state.
  12. * @returns {LiveStreaming}
  13. */
  14. export function getLiveStreaming(state: IReduxState) {
  15. const { liveStreaming = {} } = state['features/base/config'];
  16. const regexp = liveStreaming.validatorRegExpString
  17. && new RegExp(liveStreaming.validatorRegExpString);
  18. return {
  19. enabled: Boolean(liveStreaming.enabled),
  20. helpURL: liveStreaming.helpLink || JITSI_LIVE_STREAMING_HELP_LINK,
  21. termsURL: liveStreaming.termsLink || YOUTUBE_TERMS_URL,
  22. dataPrivacyURL: liveStreaming.dataPrivacyLink || GOOGLE_PRIVACY_POLICY,
  23. streamLinkRegexp: regexp || FOUR_GROUPS_DASH_SEPARATED
  24. };
  25. }