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

actions.js 920B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {
  2. MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
  3. SUSPEND_DETECTED
  4. } from './actionTypes';
  5. /**
  6. * Signals that the prompt for media permission is visible or not.
  7. *
  8. * @param {boolean} isVisible - If the value is true - the prompt for media
  9. * permission is visible otherwise the value is false/undefined.
  10. * @param {string} browser - The name of the current browser.
  11. * @returns {{
  12. * type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
  13. * browser: {string},
  14. * isVisible: {boolean}
  15. * }}
  16. * @public
  17. */
  18. export function mediaPermissionPromptVisibilityChanged(isVisible, browser) {
  19. return {
  20. type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
  21. browser,
  22. isVisible
  23. };
  24. }
  25. /**
  26. * Signals that suspend was detected.
  27. *
  28. * @returns {{
  29. * type: SUSPEND_DETECTED
  30. * }}
  31. * @public
  32. */
  33. export function suspendDetected() {
  34. return {
  35. type: SUSPEND_DETECTED
  36. };
  37. }