jiti-meet/react/features/desktop-picker/actions.ts

22 lines
635 B
TypeScript
Raw Normal View History

import { openDialog } from '../base/dialog/actions';
2017-04-06 16:45:36 +00:00
// @ts-ignore
2017-03-30 16:58:31 +00:00
import { DesktopPicker } from './components';
/**
* Signals to open a dialog with the DesktopPicker component.
*
* @param {Object} options - Desktop sharing settings.
2017-03-30 16:58:31 +00:00
* @param {Function} onSourceChoose - The callback to invoke when
* a DesktopCapturerSource has been chosen.
* @returns {Object}
*/
export function showDesktopPicker(options: { desktopSharingSources?: any; } = {}, onSourceChoose: Function) {
const { desktopSharingSources } = options;
2017-03-30 16:58:31 +00:00
return openDialog(DesktopPicker, {
desktopSharingSources,
2017-03-30 16:58:31 +00:00
onSourceChoose
});
}