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.

constants.js 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // @flow
  2. import {
  3. CLAP_SOUND_FILES,
  4. LAUGH_SOUND_FILES,
  5. LIKE_SOUND_FILES,
  6. BOO_SOUND_FILES,
  7. SURPRISE_SOUND_FILES,
  8. SILENCE_SOUND_FILES
  9. } from './sounds';
  10. /**
  11. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  12. * triggered when a new laugh reaction is received.
  13. *
  14. * @type { string }
  15. */
  16. export const LAUGH_SOUND_ID = 'LAUGH_SOUND_';
  17. /**
  18. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  19. * triggered when a new clap reaction is received.
  20. *
  21. * @type {string}
  22. */
  23. export const CLAP_SOUND_ID = 'CLAP_SOUND_';
  24. /**
  25. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  26. * triggered when a new like reaction is received.
  27. *
  28. * @type {string}
  29. */
  30. export const LIKE_SOUND_ID = 'LIKE_SOUND_';
  31. /**
  32. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  33. * triggered when a new boo reaction is received.
  34. *
  35. * @type {string}
  36. */
  37. export const BOO_SOUND_ID = 'BOO_SOUND_';
  38. /**
  39. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  40. * triggered when a new surprised reaction is received.
  41. *
  42. * @type {string}
  43. */
  44. export const SURPRISE_SOUND_ID = 'SURPRISE_SOUND_';
  45. /**
  46. * The audio ID prefix of the audio element for which the {@link playAudio} action is
  47. * triggered when a new silence reaction is received.
  48. *
  49. * @type {string}
  50. */
  51. export const SILENCE_SOUND_ID = 'SILENCE_SOUND_';
  52. /**
  53. * The audio ID of the audio element for which the {@link playAudio} action is
  54. * triggered when a new raise hand event is received.
  55. *
  56. * @type {string}
  57. */
  58. export const RAISE_HAND_SOUND_ID = 'RAISE_HAND_SOUND_ID';
  59. export type ReactionEmojiProps = {
  60. /**
  61. * Reaction to be displayed.
  62. */
  63. reaction: string,
  64. /**
  65. * Id of the reaction.
  66. */
  67. uid: number
  68. }
  69. export const SOUNDS_THRESHOLDS = [ 1, 4, 10 ];
  70. export const REACTIONS = {
  71. like: {
  72. message: ':thumbs_up:',
  73. emoji: '👍',
  74. shortcutChar: 'T',
  75. soundId: LIKE_SOUND_ID,
  76. soundFiles: LIKE_SOUND_FILES
  77. },
  78. clap: {
  79. message: ':clap:',
  80. emoji: '👏',
  81. shortcutChar: 'C',
  82. soundId: CLAP_SOUND_ID,
  83. soundFiles: CLAP_SOUND_FILES
  84. },
  85. laugh: {
  86. message: ':grinning_face:',
  87. emoji: '😀',
  88. shortcutChar: 'L',
  89. soundId: LAUGH_SOUND_ID,
  90. soundFiles: LAUGH_SOUND_FILES
  91. },
  92. surprised: {
  93. message: ':face_with_open_mouth:',
  94. emoji: '😮',
  95. shortcutChar: 'O',
  96. soundId: SURPRISE_SOUND_ID,
  97. soundFiles: SURPRISE_SOUND_FILES
  98. },
  99. boo: {
  100. message: ':slightly_frowning_face:',
  101. emoji: '🙁',
  102. shortcutChar: 'B',
  103. soundId: BOO_SOUND_ID,
  104. soundFiles: BOO_SOUND_FILES
  105. },
  106. silence: {
  107. message: ':face_without_mouth:',
  108. emoji: '😶',
  109. shortcutChar: 'S',
  110. soundId: SILENCE_SOUND_ID,
  111. soundFiles: SILENCE_SOUND_FILES
  112. }
  113. };