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

actions.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* @flow */
  2. import { LOAD_CONFIG_ERROR, SET_CONFIG } from './actionTypes';
  3. /**
  4. * Signals that a configuration could not be loaded due to a specific error.
  5. *
  6. * @param {Error} error - The {@code Error} which prevented the successful
  7. * loading of a configuration.
  8. * @param {string|URL} locationURL - The URL of the location which necessitated
  9. * the loading of a configuration.
  10. * @returns {{
  11. * type: LOAD_CONFIG_ERROR,
  12. * error: Error,
  13. * locationURL
  14. * }}
  15. */
  16. export function loadConfigError(error: Error, locationURL: string | URL) {
  17. return {
  18. type: LOAD_CONFIG_ERROR,
  19. error,
  20. locationURL
  21. };
  22. }
  23. /**
  24. * Sets the configuration represented by the feature base/config. The
  25. * configuration is defined and consumed by the library lib-jitsi-meet but some
  26. * of its properties are consumed by the application jitsi-meet as well.
  27. *
  28. * @param {Object} config - The configuration to be represented by the feature
  29. * base/config.
  30. * @returns {{
  31. * type: SET_CONFIG,
  32. * config: Object
  33. * }}
  34. */
  35. export function setConfig(config: Object = {}) {
  36. return {
  37. type: SET_CONFIG,
  38. config
  39. };
  40. }