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.

actions.ts 631B

1234567891011121314151617181920
  1. import { openDialog } from '../base/dialog/actions';
  2. import DesktopPicker from './components/DesktopPicker';
  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: { desktopSharingSources?: any; } = {}, onSourceChoose: Function) {
  12. const { desktopSharingSources } = options;
  13. return openDialog(DesktopPicker, {
  14. desktopSharingSources,
  15. onSourceChoose
  16. });
  17. }