Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(av-moderation) Only stop screensharing on Stop everyone's video

robertpine9f3625ffa44
diff --git a/react/features/video-menu/actions.any.js b/react/features/video-menu/actions.any.js
index 5d4b835fe5..a0c4aa0f95 100644
--- a/react/features/video-menu/actions.any.js
+++ b/react/features/video-menu/actions.any.js
@@ -35,9 +35,10 @@ const logger = getLogger(__filename);
*
* @param {boolean} enable - Whether to mute or unmute.
* @param {MEDIA_TYPE} mediaType - The type of the media channel to mute.
+ * @param {boolean} stopScreenSharing - Whether or not to stop the screensharing.
* @returns {Function}
*/
-export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE) {
+export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE, stopScreenSharing: boolean = false) {
return (dispatch: Dispatch<any>, getState: Function) => {
const isAudio = mediaType === MEDIA_TYPE.AUDIO;
@@ -56,7 +57,7 @@ export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE) {
return;
}
- if (enable) {
+ if (enable && stopScreenSharing) {
dispatch(toggleScreensharing(false, false, true));
}
@@ -102,7 +103,7 @@ export function muteAllParticipants(exclude: Array<string>, mediaType: MEDIA_TYP
const localId = getLocalParticipant(state).id;
if (!exclude.includes(localId)) {
- dispatch(muteLocal(true, mediaType));
+ dispatch(muteLocal(true, mediaType, true));
}
getRemoteParticipants(state).forEach((p, id) => {