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 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // @flow
  2. import { openDialog } from '../base/dialog';
  3. import { SharedVideoMenu } from '../video-menu';
  4. import ConnectionStatusComponent
  5. from '../video-menu/components/native/ConnectionStatusComponent';
  6. import RemoteVideoMenu from '../video-menu/components/native/RemoteVideoMenu';
  7. import { SET_VOLUME } from './actionTypes';
  8. import {
  9. ContextMenuLobbyParticipantReject
  10. } from './components/native';
  11. export * from './actions.any';
  12. /**
  13. * Displays the context menu for the selected lobby participant.
  14. *
  15. * @param {Object} participant - The selected lobby participant.
  16. * @returns {Function}
  17. */
  18. export function showContextMenuReject(participant: Object) {
  19. return openDialog(ContextMenuLobbyParticipantReject, { participant });
  20. }
  21. /**
  22. * Displays the connection status for the local meeting participant.
  23. *
  24. * @param {string} participantID - The selected meeting participant id.
  25. * @returns {Function}
  26. */
  27. export function showConnectionStatus(participantID: string) {
  28. return openDialog(ConnectionStatusComponent, { participantID });
  29. }
  30. /**
  31. * Displays the context menu for the selected meeting participant.
  32. *
  33. * @param {string} participantId - The ID of the selected meeting participant.
  34. * @returns {Function}
  35. */
  36. export function showContextMenuDetails(participantId: string) {
  37. return openDialog(RemoteVideoMenu, { participantId });
  38. }
  39. /**
  40. * Displays the shared video menu.
  41. *
  42. * @param {string} participantId - The ID of the selected meeting participant.
  43. * @returns {Function}
  44. */
  45. export function showSharedVideoMenu(participantId: string) {
  46. return openDialog(SharedVideoMenu, { participantId });
  47. }
  48. /**
  49. * Sets the volume.
  50. *
  51. * @param {string} participantId - The participant ID associated with the audio.
  52. * @param {string} volume - The volume level.
  53. * @returns {{
  54. * type: SET_VOLUME,
  55. * participantId: string,
  56. * volume: number
  57. * }}
  58. */
  59. export function setVolume(participantId: string, volume: number) {
  60. return {
  61. type: SET_VOLUME,
  62. participantId,
  63. volume
  64. };
  65. }