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.
|
|
|
|
*
|
2017-07-09 21:34:08 +00:00
|
|
|
* @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}
|
|
|
|
*/
|
2017-10-20 00:17:38 +00:00
|
|
|
export function showDesktopPicker(options = {}, onSourceChoose) {
|
|
|
|
const { desktopSharingSources } = options;
|
|
|
|
|
2017-03-30 16:58:31 +00:00
|
|
|
return openDialog(DesktopPicker, {
|
2017-10-20 00:17:38 +00:00
|
|
|
desktopSharingSources,
|
2017-03-30 16:58:31 +00:00
|
|
|
onSourceChoose
|
|
|
|
});
|
|
|
|
}
|