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.

actions.js 940B

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