fix(conference) Disable audio-only mode when user switches to screenshare.
Make the behavior consistent with enabling camera when the user is audio-only mode. Also fixes an issue where the screenshare preview doesn't appear if it is enabled while the user is in audio-only mode.
This commit is contained in:
parent
981e96fb6a
commit
9d8ae922a9
|
@ -27,6 +27,7 @@ import {
|
||||||
} from './react/features/app/actions';
|
} from './react/features/app/actions';
|
||||||
import { showModeratedNotification } from './react/features/av-moderation/actions';
|
import { showModeratedNotification } from './react/features/av-moderation/actions';
|
||||||
import { shouldShowModeratedNotification } from './react/features/av-moderation/functions';
|
import { shouldShowModeratedNotification } from './react/features/av-moderation/functions';
|
||||||
|
import { setAudioOnly } from './react/features/base/audio-only';
|
||||||
import {
|
import {
|
||||||
AVATAR_URL_COMMAND,
|
AVATAR_URL_COMMAND,
|
||||||
EMAIL_COMMAND,
|
EMAIL_COMMAND,
|
||||||
|
@ -1677,6 +1678,9 @@ export default {
|
||||||
return Promise.reject('Cannot toggle screen sharing: not supported.');
|
return Promise.reject('Cannot toggle screen sharing: not supported.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isAudioOnly()) {
|
||||||
|
APP.store.dispatch(setAudioOnly(false));
|
||||||
|
}
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
try {
|
try {
|
||||||
await this._switchToScreenSharing(options);
|
await this._switchToScreenSharing(options);
|
||||||
|
@ -1938,11 +1942,13 @@ export default {
|
||||||
// api.
|
// api.
|
||||||
if (localAudio) {
|
if (localAudio) {
|
||||||
this._mixerEffect = new AudioMixerEffect(this._desktopAudioStream);
|
this._mixerEffect = new AudioMixerEffect(this._desktopAudioStream);
|
||||||
|
logger.debug(`_switchToScreenSharing is mixing ${this._desktopAudioStream} and ${localAudio}`
|
||||||
|
+ ' as a single audio stream');
|
||||||
await localAudio.setEffect(this._mixerEffect);
|
await localAudio.setEffect(this._mixerEffect);
|
||||||
} else {
|
} else {
|
||||||
// If no local stream is present ( i.e. no input audio devices) we use the screen share audio
|
// If no local stream is present ( i.e. no input audio devices) we use the screen share audio
|
||||||
// stream as we would use a regular stream.
|
// stream as we would use a regular stream.
|
||||||
|
logger.debug(`_switchToScreenSharing is using ${this._desktopAudioStream} for useAudioStream`);
|
||||||
await this.useAudioStream(this._desktopAudioStream);
|
await this.useAudioStream(this._desktopAudioStream);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue