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

21 lines
569 B
JavaScript
Raw Normal View History

2017-03-30 16:58:31 +00:00
import { openDialog } from '../base/dialog';
2017-04-06 16:45:36 +00:00
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 = {}, onSourceChoose) {
const { desktopSharingSources } = options;
2017-03-30 16:58:31 +00:00
return openDialog(DesktopPicker, {
desktopSharingSources,
2017-03-30 16:58:31 +00:00
onSourceChoose
});
}