瀏覽代碼

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

master
robertpin 3 年之前
父節點
當前提交
e9f3625ffa
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4
    3
      react/features/video-menu/actions.any.js

+ 4
- 3
react/features/video-menu/actions.any.js 查看文件

@@ -35,9 +35,10 @@ const logger = getLogger(__filename);
35 35
  *
36 36
  * @param {boolean} enable - Whether to mute or unmute.
37 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 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 42
     return (dispatch: Dispatch<any>, getState: Function) => {
42 43
         const isAudio = mediaType === MEDIA_TYPE.AUDIO;
43 44
 
@@ -56,7 +57,7 @@ export function muteLocal(enable: boolean, mediaType: MEDIA_TYPE) {
56 57
             return;
57 58
         }
58 59
 
59
-        if (enable) {
60
+        if (enable && stopScreenSharing) {
60 61
             dispatch(toggleScreensharing(false, false, true));
61 62
         }
62 63
 
@@ -102,7 +103,7 @@ export function muteAllParticipants(exclude: Array<string>, mediaType: MEDIA_TYP
102 103
         const localId = getLocalParticipant(state).id;
103 104
 
104 105
         if (!exclude.includes(localId)) {
105
-            dispatch(muteLocal(true, mediaType));
106
+            dispatch(muteLocal(true, mediaType, true));
106 107
         }
107 108
 
108 109
         getRemoteParticipants(state).forEach((p, id) => {

Loading…
取消
儲存