2021-06-11 13:12:00 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-06-03 16:23:18 +00:00
|
|
|
import { openDialog } from '../base/dialog';
|
|
|
|
|
2021-07-01 10:12:38 +00:00
|
|
|
import { SET_VOLUME } from './actionTypes';
|
2021-06-04 15:07:18 +00:00
|
|
|
import { ContextMenuLobbyParticipantReject, ContextMenuMeetingParticipantDetails } from './components/native';
|
2021-06-11 13:12:00 +00:00
|
|
|
export * from './actions.any';
|
2021-06-11 07:15:20 +00:00
|
|
|
|
2021-06-03 16:23:18 +00:00
|
|
|
/**
|
|
|
|
* Displays the context menu for the selected lobby participant.
|
|
|
|
*
|
2021-06-04 15:07:18 +00:00
|
|
|
* @param {Object} participant - The selected lobby participant.
|
2021-06-03 16:23:18 +00:00
|
|
|
* @returns {Function}
|
|
|
|
*/
|
2021-06-11 13:12:00 +00:00
|
|
|
export function showContextMenuReject(participant: Object) {
|
2021-06-04 15:07:18 +00:00
|
|
|
return openDialog(ContextMenuLobbyParticipantReject, { participant });
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Displays the context menu for the selected meeting participant.
|
|
|
|
*
|
|
|
|
* @param {Object} participant - The selected meeting participant.
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
2021-06-11 13:12:00 +00:00
|
|
|
export function showContextMenuDetails(participant: Object) {
|
2021-06-04 15:07:18 +00:00
|
|
|
return openDialog(ContextMenuMeetingParticipantDetails, { participant });
|
2021-06-03 16:23:18 +00:00
|
|
|
}
|
2021-07-01 10:12:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the volume.
|
|
|
|
*
|
|
|
|
* @param {string} participantId - The participant ID associated with the audio.
|
|
|
|
* @param {string} volume - The volume level.
|
|
|
|
* @returns {{
|
|
|
|
* type: SET_VOLUME,
|
|
|
|
* participantId: string,
|
|
|
|
* volume: number
|
|
|
|
* }}
|
|
|
|
*/
|
|
|
|
export function setVolume(participantId: string, volume: number) {
|
|
|
|
return {
|
|
|
|
type: SET_VOLUME,
|
|
|
|
participantId,
|
|
|
|
volume
|
|
|
|
};
|
|
|
|
}
|