2022-12-14 12:23:07 +00:00
|
|
|
import { openDialog } from '../base/dialog/actions';
|
2017-04-06 16:45:36 +00:00
|
|
|
|
2022-12-14 12:23:07 +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.
|
|
|
|
*
|
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}
|
|
|
|
*/
|
2022-12-14 12:23:07 +00:00
|
|
|
export function showDesktopPicker(options: { desktopSharingSources?: any; } = {}, onSourceChoose: Function) {
|
2017-10-20 00:17:38 +00:00
|
|
|
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
|
|
|
|
});
|
|
|
|
}
|