Browse Source

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

master
robertpin 3 years ago
parent
commit
e9f3625ffa
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      react/features/video-menu/actions.any.js

+ 4
- 3
react/features/video-menu/actions.any.js View File

35
  *
35
  *
36
  * @param {boolean} enable - Whether to mute or unmute.
36
  * @param {boolean} enable - Whether to mute or unmute.
37
  * @param {MEDIA_TYPE} mediaType - The type of the media channel to mute.
37
  * @param {MEDIA_TYPE} mediaType - The type of the media channel to mute.
38
+ * @param {boolean} stopScreenSharing - Whether or not to stop the screensharing.
38
  * @returns {Function}
39
  * @returns {Function}
39
  */
40
  */
40
-export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE) {
41
+export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE, stopScreenSharing: boolean = false) {
41
     return (dispatch: Dispatch<any>, getState: Function) => {
42
     return (dispatch: Dispatch<any>, getState: Function) => {
42
         const isAudio = mediaType === MEDIA_TYPE.AUDIO;
43
         const isAudio = mediaType === MEDIA_TYPE.AUDIO;
43
 
44
 
56
             return;
57
             return;
57
         }
58
         }
58
 
59
 
59
-        if (enable) {
60
+        if (enable && stopScreenSharing) {
60
             dispatch(toggleScreensharing(false, false, true));
61
             dispatch(toggleScreensharing(false, false, true));
61
         }
62
         }
62
 
63
 
102
         const localId = getLocalParticipant(state).id;
103
         const localId = getLocalParticipant(state).id;
103
 
104
 
104
         if (!exclude.includes(localId)) {
105
         if (!exclude.includes(localId)) {
105
-            dispatch(muteLocal(true, mediaType));
106
+            dispatch(muteLocal(true, mediaType, true));
106
         }
107
         }
107
 
108
 
108
         getRemoteParticipants(state).forEach((p, id) => {
109
         getRemoteParticipants(state).forEach((p, id) => {

Loading…
Cancel
Save