feat(audioOnly): do not disable when SS starts

This commit is contained in:
Hristo Terezov 2022-12-19 19:20:30 -06:00
parent d91f49ec88
commit 17b5009e63
2 changed files with 8 additions and 4 deletions

View File

@ -712,6 +712,8 @@
"reactionSoundsForAll": "Disable sounds for all",
"screenShareNoAudio": "Share audio box was not checked in the window selection screen.",
"screenShareNoAudioTitle": "Couldn't share system audio!",
"screenSharingAudioOnlyDescription": "Please note that by sharing your screen you're affecting the \"Best performance\" mode and you will use more bandwidth.",
"screenSharingAudioOnlyTitle": "\"Best performance\" mode",
"selfViewTitle": "You can always un-hide the self-view from settings",
"somebody": "Somebody",
"startSilentDescription": "Rejoin the meeting to enable audio",

View File

@ -14,7 +14,6 @@ import { isAudioOnlySharing, isScreenVideoShared } from '../../screen-share/func
import { isScreenshotCaptureEnabled, toggleScreenshotCaptureSummary } from '../../screenshot-capture';
// @ts-ignore
import { AudioMixerEffect } from '../../stream-effects/audio-mixer/AudioMixerEffect';
import { setAudioOnly } from '../audio-only/actions';
import { getCurrentConference } from '../conference/functions';
import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
import { setScreenshareMuted } from '../media/actions';
@ -227,12 +226,15 @@ async function _toggleScreenSharing(
}
}
// Disable audio-only or best performance mode if the user starts screensharing. This doesn't apply to
// audio-only screensharing.
// Show notification about more bandwidth usage in audio-only mode if the user starts screensharing. This
// doesn't apply to audio-only screensharing.
const { enabled: bestPerformanceMode } = state['features/base/audio-only'];
if (bestPerformanceMode && !audioOnly) {
dispatch(setAudioOnly(false));
dispatch(showNotification({
titleKey: 'notify.screenSharingAudioOnlyTitle',
descriptionKey: 'notify.screenSharingAudioOnlyDescription'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
}
} else {
const { desktopAudioTrack } = state['features/screen-share'];