You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. import { openDialog } from '../base/dialog';
  2. import { DesktopPicker } from './components';
  3. /**
  4. * Signals to open a dialog with the DesktopPicker component.
  5. *
  6. * @param {Object} options - Desktop sharing settings.
  7. * @param {Function} onSourceChoose - The callback to invoke when
  8. * a DesktopCapturerSource has been chosen.
  9. * @returns {Object}
  10. */
  11. export function showDesktopPicker(options = {}, onSourceChoose) {
  12. const { desktopSharingSources } = options;
  13. return openDialog(DesktopPicker, {
  14. desktopSharingSources,
  15. onSourceChoose
  16. });
  17. }