2021-06-11 13:12:00 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-06-03 16:23:18 +00:00
|
|
|
import { openDialog } from '../base/dialog';
|
2021-08-04 08:51:05 +00:00
|
|
|
import { SharedVideoMenu } from '../video-menu';
|
2021-07-30 09:46:49 +00:00
|
|
|
import ConnectionStatusComponent
|
|
|
|
from '../video-menu/components/native/ConnectionStatusComponent';
|
|
|
|
import RemoteVideoMenu from '../video-menu/components/native/RemoteVideoMenu';
|
2021-06-03 16:23:18 +00:00
|
|
|
|
2021-07-01 10:12:38 +00:00
|
|
|
import { SET_VOLUME } from './actionTypes';
|
2021-07-13 13:17:20 +00:00
|
|
|
import {
|
|
|
|
ContextMenuLobbyParticipantReject
|
|
|
|
} 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 });
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-07-30 09:46:49 +00:00
|
|
|
* Displays the connection status for the local meeting participant.
|
2021-06-04 15:07:18 +00:00
|
|
|
*
|
2021-07-12 15:14:38 +00:00
|
|
|
* @param {string} participantID - The selected meeting participant id.
|
2021-06-04 15:07:18 +00:00
|
|
|
* @returns {Function}
|
|
|
|
*/
|
2021-07-30 09:46:49 +00:00
|
|
|
export function showConnectionStatus(participantID: String) {
|
|
|
|
return openDialog(ConnectionStatusComponent, { participantID });
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Displays the context menu for the selected meeting participant.
|
|
|
|
*
|
|
|
|
* @param {Object} participant - The selected meeting participant.
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
export function showContextMenuDetails(participant: Object) {
|
|
|
|
return openDialog(RemoteVideoMenu, { participant });
|
2021-06-03 16:23:18 +00:00
|
|
|
}
|
2021-07-01 10:12:38 +00:00
|
|
|
|
2021-08-04 08:51:05 +00:00
|
|
|
/**
|
|
|
|
* Displays the shared video menu.
|
|
|
|
*
|
|
|
|
* @param {Object} participant - The selected meeting participant.
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
export function showSharedVideoMenu(participant: Object) {
|
|
|
|
return openDialog(SharedVideoMenu, { participant });
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
}
|