Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* @flow */
  2. import {
  3. LOCAL_RECORDING_ENGAGED,
  4. LOCAL_RECORDING_UNENGAGED,
  5. LOCAL_RECORDING_TOGGLE_DIALOG,
  6. LOCAL_RECORDING_STATS_UPDATE
  7. } from './actionTypes';
  8. /**
  9. * Signals state change in local recording engagement.
  10. * In other words, the events of the local WebWorker / MediaRecorder
  11. * starting to record and finishing recording.
  12. *
  13. * Note that this is not the event fired when the users tries to start
  14. * the recording in the UI.
  15. *
  16. * @param {bool} isEngaged - Whether local recording is engaged or not.
  17. * @returns {{
  18. * type: LOCAL_RECORDING_ENGAGED
  19. * }|{
  20. * type: LOCAL_RECORDING_UNENGAGED
  21. * }}
  22. */
  23. export function signalLocalRecordingEngagement(isEngaged: boolean) {
  24. return {
  25. type: isEngaged ? LOCAL_RECORDING_ENGAGED : LOCAL_RECORDING_UNENGAGED
  26. };
  27. }
  28. /**
  29. * Toggles the open/close state of {@code LocalRecordingInfoDialog}.
  30. *
  31. * @returns {{
  32. * type: LOCAL_RECORDING_TOGGLE_DIALOG
  33. * }}
  34. */
  35. export function toggleLocalRecordingInfoDialog() {
  36. return {
  37. type: LOCAL_RECORDING_TOGGLE_DIALOG
  38. };
  39. }
  40. /**
  41. * Updates the the local recording stats from each client,
  42. * to be displayed on {@code LocalRecordingInfoDialog}.
  43. *
  44. * @param {*} stats - The stats object.
  45. * @returns {{
  46. * type: LOCAL_RECORDING_STATS_UPDATE,
  47. * stats: Object
  48. * }}
  49. */
  50. export function statsUpdate(stats: Object) {
  51. return {
  52. type: LOCAL_RECORDING_STATS_UPDATE,
  53. stats
  54. };
  55. }