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

functions.js 919B

1234567891011121314151617181920212223242526272829303132
  1. // @flow
  2. import JitsiMeetJS from '../lib-jitsi-meet';
  3. import { updateSettings } from '../settings';
  4. /**
  5. * Get device id of the audio output device which is currently in use.
  6. * Empty string stands for default device.
  7. *
  8. * @returns {string}
  9. */
  10. export function getAudioOutputDeviceId() {
  11. return JitsiMeetJS.mediaDevices.getAudioOutputDevice();
  12. }
  13. /**
  14. * Set device id of the audio output device which is currently in use.
  15. * Empty string stands for default device.
  16. *
  17. * @param {string} newId - New audio output device id.
  18. * @param {Function} dispatch - The Redux dispatch function.
  19. * @returns {Promise}
  20. */
  21. export function setAudioOutputDeviceId(
  22. newId: string = 'default',
  23. dispatch: Function): Promise<*> {
  24. return JitsiMeetJS.mediaDevices.setAudioOutputDevice(newId)
  25. .then(() =>
  26. dispatch(updateSettings({
  27. audioOutputDeviceId: newId
  28. })));
  29. }