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.native.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // @flow
  2. import { openDialog } from '../base/dialog';
  3. import { SET_VOLUME } from './actionTypes';
  4. import {
  5. ContextMenuMeetingParticipantDetails,
  6. ContextMenuLobbyParticipantReject
  7. } from './components/native';
  8. export * from './actions.any';
  9. /**
  10. * Displays the context menu for the selected lobby participant.
  11. *
  12. * @param {Object} participant - The selected lobby participant.
  13. * @returns {Function}
  14. */
  15. export function showContextMenuReject(participant: Object) {
  16. return openDialog(ContextMenuLobbyParticipantReject, { participant });
  17. }
  18. /**
  19. * Displays the context menu for the selected meeting participant.
  20. *
  21. * @param {string} participantID - The selected meeting participant id.
  22. * @returns {Function}
  23. */
  24. export function showContextMenuDetails(participantID: String) {
  25. return openDialog(ContextMenuMeetingParticipantDetails, { participantID });
  26. }
  27. /**
  28. * Sets the volume.
  29. *
  30. * @param {string} participantId - The participant ID associated with the audio.
  31. * @param {string} volume - The volume level.
  32. * @returns {{
  33. * type: SET_VOLUME,
  34. * participantId: string,
  35. * volume: number
  36. * }}
  37. */
  38. export function setVolume(participantId: string, volume: number) {
  39. return {
  40. type: SET_VOLUME,
  41. participantId,
  42. volume
  43. };
  44. }