您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

actions.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* globals APP */
  2. import { openDialog } from '../base/dialog';
  3. import JitsiMeetJS from '../base/lib-jitsi-meet';
  4. import { DeviceSelectionDialog } from './components';
  5. /**
  6. * Open DeviceSelectionDialog with a configuration based on the environment's
  7. * supported abilities.
  8. *
  9. * @returns {Function}
  10. */
  11. export function openDeviceSelectionDialog() {
  12. return (dispatch, getState) => {
  13. JitsiMeetJS.mediaDevices.isDeviceListAvailable()
  14. .then(isDeviceListAvailable => {
  15. const state = getState();
  16. const conference = state['features/base/conference'].conference;
  17. dispatch(openDialog(DeviceSelectionDialog, {
  18. currentAudioOutputId: APP.settings.getAudioOutputDeviceId(),
  19. currentAudioTrack: conference.getLocalAudioTrack(),
  20. currentVideoTrack: conference.getLocalVideoTrack(),
  21. disableAudioInputChange:
  22. !JitsiMeetJS.isMultipleAudioInputSupported(),
  23. disableDeviceChange: !isDeviceListAvailable
  24. || !JitsiMeetJS.mediaDevices.isDeviceChangeAvailable(),
  25. hasAudioPermission: JitsiMeetJS.mediaDevices
  26. .isDevicePermissionGranted('audio'),
  27. hasVideoPermission: JitsiMeetJS.mediaDevices
  28. .isDevicePermissionGranted('video'),
  29. hideAudioInputPreview:
  30. !JitsiMeetJS.isCollectingLocalStats(),
  31. hideAudioOutputSelect: !JitsiMeetJS.mediaDevices
  32. .isDeviceChangeAvailable('output')
  33. }));
  34. });
  35. };
  36. }